[Rt-commit] rtir branch, 4.0/incident-create-callbacks, created. 4.0.0-55-g846eb81

Jim Brandt jbrandt at bestpractical.com
Wed Jul 26 09:19:48 EDT 2017


The branch, 4.0/incident-create-callbacks has been created
        at  846eb810e99d6dfa3b9202b2bba6d85b6cc7f41f (commit)

- Log -----------------------------------------------------------------
commit 846eb810e99d6dfa3b9202b2bba6d85b6cc7f41f
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Jul 26 09:17:14 2017 -0400

    Add new callbacks and add parameters to some existing callbacks
    
    These support providing the combined incident and
    investigation create page as an extension. This feature
    was removed from core RTIR in 5f72e57.

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index b765199..64f29ad 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -273,8 +273,10 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
 
 </div>
 
-</form>
+% $m->callback( CallbackName => 'FormEnd', QueueObj => $QueueObj, Constituency => $constituency,
+%    ChildObj => $ChildObj, SplitObj => $SplitObj, ARGSRef => \%ARGS );
 
+</form>
 
 <%INIT>
 my %CFDefaults;
@@ -303,7 +305,8 @@ $m->callback(
     CallbackName => 'ProcessArguments',
     ARGSRef => \%ARGS,
     Ticket => $SplitObj,
-    Child => $ChildObj
+    Child => $ChildObj,
+    CreateIncident => \$CreateIncident
 );
 
 
@@ -379,6 +382,9 @@ if ( $CreateIncident ) {
     );
 }
 
+$m->callback( CallbackName => 'BeforeCreateRedirect', ARGSRef => \%ARGS,
+    Child => $ChildObj, results => \@results, checks_failure => \$checks_failure );
+
 if ( !$checks_failure && $CreateIncident ) {
     my ($inc_obj, @tmp) = $m->comp(
         '/RTIR/Investigation/Elements/Create:Process',
@@ -391,7 +397,8 @@ if ( !$checks_failure && $CreateIncident ) {
     push @results, @tmp;
 
     if( $inc_obj ) {
-        $m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Child => $ChildObj, TicketObj => $inc_obj);
+        $m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Child => $ChildObj, TicketObj => $inc_obj,
+            results => \@results );
 
         MaybeRedirectForResults(
             Actions   => \@results,

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


More information about the rt-commit mailing list