[Rt-commit] rtir branch, 4.0/incident-create-callbacks, created. 4.0.0-55-g8226abe
Jim Brandt
jbrandt at bestpractical.com
Thu Jul 27 14:59:27 EDT 2017
The branch, 4.0/incident-create-callbacks has been created
at 8226abe0bf0ae243ad1a62c25c6f6df618113c7e (commit)
- Log -----------------------------------------------------------------
commit 8226abe0bf0ae243ad1a62c25c6f6df618113c7e
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,
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index e6dcc31..9c51af8 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -211,7 +211,10 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
<& /RTIR/Create.html:AttachmentsForm &>
% }
-</table></&></div>
+</table></&>
+% $m->callback( CallbackName => 'AfterTable', ARGSRef => \%ARGS, TicketObj => $ticket,
+% QueueObj => $QueueObj, DefaultsFrom => $TicketObj );
+</div>
<%ARGS>
$NamePrefix => ''
-----------------------------------------------------------------------
More information about the rt-commit
mailing list