diff --git a/code/web/Drivers/Sierra.php b/code/web/Drivers/Sierra.php index c69595703d..a5e981243a 100644 --- a/code/web/Drivers/Sierra.php +++ b/code/web/Drivers/Sierra.php @@ -835,9 +835,9 @@ function freezeHold($patron, $recordId, $itemToFreezeId, $dateToReactivate): arr ]; } else { $return = [ - 'success' => true, + 'success' => false, 'message' => translate([ - 'text' => "Unable to freeze your hold.", + 'text' => 'Unable to freeze your hold.', 'isPublicFacing' => true, ]), 'api' => [ diff --git a/code/web/release_notes/24.06.00.MD b/code/web/release_notes/24.06.00.MD index 121e0f6dec..b6a8744288 100644 --- a/code/web/release_notes/24.06.00.MD +++ b/code/web/release_notes/24.06.00.MD @@ -128,6 +128,7 @@ - When using the "Pickup at" setting within the Format Map, properly load available locations when the location code is not the entire location code of the item. (Tickets 128864, 130706) (*MDN*) - Add additional handling for looking up titles for holds and checkouts if the item id cannot be found in Aspen. (Ticket 130159) (*MDN*) - When freezing selected or all holds, do not show a prompt for reactivation date. (Tickets 133197, 131688) (*MDN*) +- When freezing holds, make sure that success and error messages show appropriately. (Ticket 127582) (*MDN*) - Create a new Under Consideration status that can be used for order items that the library has not committed to purchase. (Ticket 128096) (*MDN*) - Libraries can select which status code is used to generate the new status. - Titles with a status of Under Consideration will be displayed after all titles that are On Order or that have been previously purchased when sorting by Date Purchased. diff --git a/code/web/services/MyAccount/AJAX.php b/code/web/services/MyAccount/AJAX.php index c3daa826cd..d164fdf3b4 100644 --- a/code/web/services/MyAccount/AJAX.php +++ b/code/web/services/MyAccount/AJAX.php @@ -969,6 +969,13 @@ function freezeHold(): array { 'text' => 'Success', 'isPublicFacing' => true, ]); + }else{ + $message = '
' . $result['message'] . '
'; + $result['message'] = $message; + $result['title'] = translate([ + 'text' => 'Error', + 'isPublicFacing' => true, + ]); } if (!$result['success'] && is_array($result['message'])) {