Bug 34042

Summary: Item search broken by FontAwesome upgrade
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, phil
Version: MainKeywords: regression
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Bug Depends on: 32910    
Bug Blocks:    
Attachments: Bug 34042: Item search broken by FontAwesome upgrade
Bug 34042: Item search broken by FontAwesome upgrade
Bug 34042: Item search broken by FontAwesome upgrade

Description Owen Leonard 2023-06-16 18:18:41 UTC
A minor regression snuck in with the FontAwesome upgrade (Bug 32910), probably from multiple rebases. We went back to "can_edit_item()" where we should have kept "can_edit_items_from( item.homebranch )".

This causes an error when trying to do an item search in the staff interface: "Template process failed: undef error - The method Koha::Patron->can_edit_item is not covered by tests!"
Comment 1 Owen Leonard 2023-06-16 18:22:56 UTC
Created attachment 152449 [details] [review]
Bug 34042: Item search broken by FontAwesome upgrade

This patch corrects a small regression in one of the templates for
outputting item search results. The template lost the change made to it
by  Bug 33070: "Remove use of can_edit_items."

The error meant that item searching wasn't working at all.

To test, apply the patch and perform an item search in the staff
interface. Results should be returned as expected.
Comment 2 Phil Ringnalda 2023-06-16 20:59:37 UTC
Created attachment 152452 [details] [review]
Bug 34042: Item search broken by FontAwesome upgrade

This patch corrects a small regression in one of the templates for
outputting item search results. The template lost the change made to it
by  Bug 33070: "Remove use of can_edit_items."

The error meant that item searching wasn't working at all.

To test, apply the patch and perform an item search in the staff
interface. Results should be returned as expected.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 3 Jonathan Druart 2023-06-20 07:12:56 UTC
Created attachment 152483 [details] [review]
Bug 34042: Item search broken by FontAwesome upgrade

This patch corrects a small regression in one of the templates for
outputting item search results. The template lost the change made to it
by  Bug 33070: "Remove use of can_edit_items."

The error meant that item searching wasn't working at all.

To test, apply the patch and perform an item search in the staff
interface. Results should be returned as expected.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi 2023-06-21 16:18:51 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-06-26 12:52:41 UTC
Depends on Bug 32910 not in 23.05.x
Comment 6 Martin Renvoize 2023-07-17 12:16:00 UTC
Not required for 23.05.x