[Bps-public-commit] RT-Extension-MandatoryOnTransition branch support-rtir created. 0.20-2-gf01a961
BPS Git Server
git at git.bestpractical.com
Tue Nov 2 14:59:59 UTC 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-MandatoryOnTransition".
The branch, support-rtir has been created
at f01a961a2737ce5192011c8794b387f895c756c1 (commit)
- Log -----------------------------------------------------------------
commit f01a961a2737ce5192011c8794b387f895c756c1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Oct 29 04:35:17 2021 +0800
Support incident reply pages for RTIR
This commit takes care of 2 things besides checking mandatory fields:
* Use 2/9 layout for Label/Input
* Exclude already existing "Resolution" CF
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Elements/ReplyForm/AfterWorked b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Elements/ReplyForm/AfterWorked
new file mode 100644
index 0000000..a4bd4a2
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Elements/ReplyForm/AfterWorked
@@ -0,0 +1 @@
+<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked, LabelCols => 2, ExcludeCustomFields => 'Resolution', %ARGS &>
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Reply/index.html/BeforeUpdate b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Reply/index.html/BeforeUpdate
new file mode 100644
index 0000000..e106f36
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Incident/Reply/index.html/BeforeUpdate
@@ -0,0 +1 @@
+<& /Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Update.html/BeforeUpdate, %ARGS &>
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked
index 42483c2..0800eea 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked
@@ -1,11 +1,16 @@
<%args>
$Ticket
+ at ExcludeCustomFields => ()
</%args>
<%init>
my ($core, $cfs, $roles) = RT::Extension::MandatoryOnTransition->RequiredFields(
Ticket => $Ticket,
To => $ARGS{'Status'} || $ARGS{'DefaultStatus'},
);
+
+my %exclude_cfs = map { $_ => 1 } @ExcludeCustomFields;
+@$cfs = grep { !$exclude_cfs{$_} } @$cfs;
+
return unless @$cfs or @$roles;
my $comp = '/Elements/EditCustomFields';
commit 5beb80e6d37d7333015ecc2ce2ed76083e5e9eea
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Nov 2 22:38:53 2021 +0800
Support RTIR update page
Unlike RT which passes "DefaultStatus", RTIR passes "Status" when select
Actions -> Resolve, which could render messages of required fields before
form is submitted, that's why we need to check SubmitTicket here.
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Update.html/BeforeUpdate b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Update.html/BeforeUpdate
new file mode 100644
index 0000000..ecd0b7c
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/RTIR/Update.html/BeforeUpdate
@@ -0,0 +1,7 @@
+% if ( $ARGSRef->{SubmitTicket} ) {
+<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate, %ARGS &>
+% }
+
+<%args>
+$ARGSRef
+</%args>
-----------------------------------------------------------------------
hooks/post-receive
--
RT-Extension-MandatoryOnTransition
More information about the Bps-public-commit
mailing list