Subject: | Partial submission: Modify.html/Default |
Date: | Tue, 25 Mar 2014 14:42:44 -0400 |
To: | bug-RT-Extension-MandatoryOnTransition [...] rt.cpan.org |
From: | Jeff Blaine <jblaine [...] kickflop.net> |
The following works fine as callback code to allow this extension to
work in RT 4.2.x
It will not work in RT 4.0.x until $skip_update has logic in 4.0.x's
share/html/Ticket/Modify.html
Place in source as
html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
<%args>
$TicketObj
$CustomFields
$ARGSRef
$skip_update
$results => []
</%args>
<%init>
my $errors_ref = RT::Extension::MandatoryOnTransition->CheckMandatoryFields(
ARGSRef => $ARGSRef,
Ticket => $TicketObj,
To => $ARGSRef->{'Status'},
);
if (@$errors_ref) {
$RT::Logger->info("Preventing update because of missing mandatory
fields");
$$skip_update = 1;
push @$results, @$errors_ref;
}
</%init>