From 60434feaf7ecb9ac4385efc631d2648257e40e15 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2025 11:38:39 -0300 Subject: [PATCH] Bug 40543: Remove pickup_library.branchname embed This patch removes this wrongly added embed and adjusts the patron holds history to use `pickup_location.name` instead. To test: 1. Have a patron with some past holds from different branches 2. Browse their holds history 3. Search on the 'Library' column by name => SUCCESS: It works :-D 4. Apply the patch 5. Run: $ ktd --shell k$ yarn api:bundle k$ koha-plack --restart kohadev 6. Repeat 2-3 => SUCCESS: Still works! 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- api/v1/swagger/paths/patrons_holds.yaml | 1 - .../intranet-tmpl/prog/en/modules/members/holdshistory.tt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/v1/swagger/paths/patrons_holds.yaml b/api/v1/swagger/paths/patrons_holds.yaml index af4623cd62e..b8c28f30d83 100644 --- a/api/v1/swagger/paths/patrons_holds.yaml +++ b/api/v1/swagger/paths/patrons_holds.yaml @@ -34,7 +34,6 @@ - deleted_biblio - item - pickup_library - - pickup_library.branchname collectionFormat: csv produces: - application/json 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 98ac161708d..6ebcbfb8c7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -203,7 +203,7 @@ }; let table_url = '/api/v1/patrons/[% patron.borrowernumber | uri %]/holds'; - let table_embeds = ['+strings', 'biblio', 'item', 'pickup_library', 'pickup_library.branchname']; + let table_embeds = ['+strings', 'biblio', 'item', 'pickup_library']; if (old){ table_url += '?old=1'; table_embeds.push('deleted_biblio'); @@ -253,7 +253,7 @@ } }, { - data: "pickup_library_id:pickup_library.branchname", + data: "pickup_library_id:pickup_library.name", searchable: true, orderable: true, render: function (data, type, row, meta) { -- 2.34.1