[Rt-commit] rtir branch, 4.0/set-skipnotifications-sooner, created. 4.0.0-44-gc146bc6

Jim Brandt jbrandt at bestpractical.com
Fri Jun 23 13:08:04 EDT 2017


The branch, 4.0/set-skipnotifications-sooner has been created
        at  c146bc66e436f05b8f3f7fa6b2605bb7b2924035 (commit)

- Log -----------------------------------------------------------------
commit c146bc66e436f05b8f3f7fa6b2605bb7b2924035
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jun 23 11:51:02 2017 -0400

    Normalize SkipNotification checkbox value to an arrayref
    
    Checkbox values can be supplied as scalar values or
    an array. The SkipNotification arg was normalized with
    @SkipNotification when passed to Display.html. However
    there are cases where code can reference SkipNotification from
    %ARGS before that call, such as when SignEncryptWidget does a
    DryRun.
    
    Set SkipNotification first so all code that references it will
    get an arrayref.

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 4de5459..aaebfb6 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -355,6 +355,9 @@
 </form>
 
 <%INIT>
+# Make sure even a single checkbox value becomes an arrayref
+$ARGS{'SkipNotification'} = \@SkipNotification;
+
 # XXX TODO remove this code that maps lifecycles to queues
 if ($Lifecycle && ! $Queue) {
     $Queue=ucfirst($Lifecycle);
@@ -513,7 +516,7 @@ unless ( $skip_create || $checks_failure ) {
     $ARGS{'new-MemberOf'} = join ' ', @Incident;
     $m->callback(CallbackName => 'BeforeDisplay', Ticket => $SplitObj, ARGSRef => \%ARGS);
     push @{ $session{'Actions'}{''} ||= [] }, @results;
-    return $m->comp( 'Display.html', %ARGS, SkipNotification => \@SkipNotification );
+    return $m->comp( 'Display.html', %ARGS );
 }
 
 unshift @results, loc("Creation failed:")

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


More information about the rt-commit mailing list