From: Jason Stephenson Date: Thu, 2 Oct 2014 00:40:15 +0000 (-0400) Subject: Fix problems with _problem_from_event in NCIP::ILS::Evergreen. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=68be12f090676925732c09a36a8056e09fdedc34;p=working%2FNCIPServer.git Fix problems with _problem_from_event in NCIP::ILS::Evergreen. Signed-off-by: Jason Stephenson --- diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index 2ed969f..6bba61d 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -2621,20 +2621,18 @@ sub _problem_from_event { if (ref($evt)) { my ($textcode, $desc); - # Get the textcode, if available. We favor those defined in - # ils_events.xml over those made up on the fly. - if ($evt->{ilsevent} && $evt->{ilsevent}->{textcode}) { - $textcode = $evt->{ilsevent}->{textcode}; - } elsif ($evt->{textcode}) { + # Get the textcode, if available. Otherwise, use the ilsevent + # "id," if available. + if ($evt->{textcode}) { $textcode = $evt->{textcode}; + } elsif ($evt->{ilsevent}) { + $textcode = $evt->{ilsevent}; } # Get the description. We favor translated descriptions over # the English in ils_events.xml. if ($evt->{desc}) { $desc = $evt->{desc}; - } elsif ($evt->{ilsevent} && $evt->{ilsevent}->{desc}) { - $desc = $evt->{ilsevent}->{desc}; } # Check if $type was set. As an "undocumented" feature, you