Commit ee9d51cc authored by Kevin Falcone's avatar Kevin Falcone
Browse files

In most uses of this page, Status is '' so %additional warns

3db519e8 refactored code into a MapStatus method, but it removed the
check to see if Status had a value.  Since most uses of this page
explicitly set Status = '' (since Status isn't changing) it causes a
warning in the logs any time you reply to an Incident.

MapStatus does 'return unless $Status', so you're guaranteed to get the
odd number of elements in a hash warning on reply.
parent 18f33cc1
......@@ -173,9 +173,10 @@ if ( $SubmitTicket && !$checks_failure ) {
push @results, map { loc("Ticket [_1]: [_2]", $id, $_) }
ProcessUpdateMessage( TicketObj => $Ticket, ARGSRef => \%ARGS );
my %additional = (
Status => RT::IR->MapStatus( $Status, $incident_cycle => $Ticket ),
);
my %additional;
if ( $Status ) {
$additional{Status} = RT::IR->MapStatus( $Status, $incident_cycle => $Ticket );
}
unless ( RT::IR->IsLinkedToActiveIncidents( $Ticket, $IncidentObj ) ) {
push @results, ProcessTicketBasics(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment