2 When the user tries to change a ticket's status to "resolved" through
3 the Update interface, check mandatory fields. If they aren't all set,
4 redirect to Ticket Basics instead of updating. Note that this will
5 lose any comments/time/other information the user has entered.
9 my $oldStatus = $TicketObj->Status();
10 my $newStatus = $ARGSRef->{'Status'} || $ARGSRef->{'DefaultStatus'} || '';
11 if( $oldStatus ne 'resolved' and
12 $newStatus eq 'resolved' and
13 $m->comp('/Ticket/Elements/CheckMandatoryFields',
17 RT::Interface::Web::Redirect(
18 RT->Config->Get('WebURL')."Ticket/Modify.html?id=".$TicketObj->Id."&resolve=1"
25 $checks_failure => undef