[Bps-public-commit] RT-Extension-MandatoryOnTransition branch support-rtir created. 0.20-1-gf2328cc

BPS Git Server git at git.bestpractical.com
Thu Oct 28 20:38:30 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  f2328cce33bd6a9b01bd87d7d78556db3e257d8a (commit)

- Log -----------------------------------------------------------------
commit f2328cce33bd6a9b01bd87d7d78556db3e257d8a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Oct 29 04:35:17 2021 +0800

    Handle incident reply pages for RTIR
    
    This commit takes care of 2 things:
    
    * 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/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';

-----------------------------------------------------------------------


hooks/post-receive
-- 
RT-Extension-MandatoryOnTransition


More information about the Bps-public-commit mailing list