LP#1842431 Make renewal failure reason more appropriate for patron notifications
authorMichele Morgan <mmorgan@noblenet.org>
Thu, 12 Sep 2019 20:30:47 +0000 (16:30 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 31 Jul 2020 15:41:25 +0000 (11:41 -0400)
Changes the failure reason for the autorenewal to include only the desc,
Removes the textcode of the event, which shouldn't be included in a patron notice.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/Circ/AutoRenew.pm

index 09dc0b1..6c6de46 100644 (file)
@@ -70,7 +70,7 @@ sub handler {
         my %user_data = (
             copy => $_->target_copy(),
             is_renewed => $is_renewed,
-            reason => !$is_renewed ? sprintf("%s : %s", $evt->{textcode}, substr($evt->{desc}, 0, 140)) : '',
+            reason => !$is_renewed ? $evt->{desc} : '',
             new_due_date => $is_renewed ? $evt->{payload}->{circ}->due_date : '',
             old_due_date => !$is_renewed ? $_->due_date() : '',
         );