[Rt-commit] [rtir] 01/01: In most uses of this page, Status is '' so %additional warns
Kevin Falcone
falcone at bestpractical.com
Thu Apr 24 17:55:00 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.0/incident-reply-warnings
in repository rtir.
commit ee9d51cc40651b68975e38121873f17688d521f4
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Apr 24 17:39:06 2014 -0400
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.
---
html/RTIR/Incident/Reply/index.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index ca3253d..71467a6 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -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(
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list