From 68be12f090676925732c09a36a8056e09fdedc34 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 1 Oct 2014 20:40:15 -0400 Subject: [PATCH] Fix problems with _problem_from_event in NCIP::ILS::Evergreen. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS/Evergreen.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 -- 2.43.2