Bugzilla – Attachment 184751 Details for
Bug 40530
Show hold cancellation reason in patron holds history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40530: Show hold cancellation reason in patron holds history
Bug-40530-Show-hold-cancellation-reason-in-patron-.patch (text/plain), 2.83 KB, created by
Kyle M Hall (khall)
on 2025-07-28 14:38:47 UTC
(
hide
)
Description:
Bug 40530: Show hold cancellation reason in patron holds history
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-07-28 14:38:47 UTC
Size:
2.83 KB
patch
obsolete
>From 2a75f7cef5c6bb5285cb67535687242c617cc45e Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 28 Jul 2025 10:36:39 -0400 >Subject: [PATCH] Bug 40530: Show hold cancellation reason in patron holds > history > >Bug 35560 includes a FIXME noting that it does not properly maintain the display of hold cancellation reasons introduced in bug 26281. > >Test Plan: >1) Place a hold and cancel it with a reason >2) Browse to the patron's hold history, note the FIXME shown instead of > the reason >3) Apply this patch >4) Reload the patch >5) You should now see the cancellation reason instead of FIXME! >--- > .../prog/en/modules/members/holdshistory.tt | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index 602338097bc..46f6ec4eb92 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -165,8 +165,19 @@ > //Remove item type column settings > table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';}); > [% END %] >- let current_holds_table = build_holds_table("#table_holdshistory"); >- let old_holds_table = build_holds_table("#table_oldholdshistory", 1); >+ const hold_cancellation_reasons = {}; >+ $.getJSON("/api/v1/authorised_value_categories/HOLD_CANCELLATION/authorised_values") >+ .done(function(data) { >+ // Convert the array into an associative array for ease of lookup >+ data.forEach(function(item) { >+ if (item.value !== undefined) { >+ hold_cancellation_reasons[item.value] = item.description; >+ } >+ }); >+ >+ let current_holds_table = build_holds_table("#table_holdshistory"); >+ let old_holds_table = build_holds_table("#table_oldholdshistory", 1); >+ }); > function build_holds_table(table_id, old){ > let additional_filters = { > "-or": function(){ >@@ -320,7 +331,7 @@ > } else if (row.cancellation_date) { > let r = _("Cancelled"); > if (row.cancellation_reason){ >- r += "(%s)".format("FIXME"); //FIXME Add HOLD_CANCELLATION description >+ r += " ( %s )".format(hold_cancellation_reasons[row.cancellation_reason]); > } > return r; > } else if (row.status == 'W') { >-- >2.39.5 (Apple Git-154)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40530
:
184751
|
184753
|
184756
|
184761
|
184762
|
184812
|
184813
|
184814
|
184816
|
184817
|
184945
|
184946
|
184947