Bug 33672

Summary: Item group features shows when placing holds if EnableItemGroupHolds is disabled
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Hold requestsAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, lucas, michaela.sieber, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06
Bug Depends on: 24857    
Bug Blocks:    
Attachments: Bug 33672: Don't show item group holds on OPAC if not enabled
Bug 33672: Don't show item group holds on OPAC if not enabled

Description Katrin Fischer 2023-05-03 22:03:06 UTC
If you don't want to allow item group holds, the option to do so should not show on the place hold forms in OPAC and staff interface when EnableItemGroupHolds is disabled.

Currnetly the option always shows.
Comment 1 Nick Clemens (kidclamp) 2023-05-04 11:17:40 UTC
Created attachment 150648 [details] [review]
Bug 33672: Don't show item group holds on OPAC if not enabled

This patch adds a check of the syspref 'EnbaleItemGroupHolds' to the
opac request form

To test:
1 - Enable 'EnableItemGroups' system preference
2 - On staff client, view a record details
3 - Go to 'Item groups' tab, add a enw group
4 - On holdings tab, select one or more items and add to group
5 - View record in OPAC
6 - PLace a hold
7 - Note group option is visible
8 - Apply patch
9 - Refresh, no group option
10 - Enable 'EnableItemGroupHolds' system preference
11 - Refresh opac page, note group option is visible
Comment 2 Nick Clemens (kidclamp) 2023-05-04 11:18:02 UTC
I don't recreate on staff, please provide steps if you can
Comment 3 Katrin Fischer 2023-05-04 11:20:53 UTC
(In reply to Nick Clemens from comment #2)
> I don't recreate on staff, please provide steps if you can

Maybe you are right, I was probably in the OPAC yesterday when I stumbled on this.
Comment 4 Katrin Fischer 2023-05-04 21:15:44 UTC
Created attachment 150698 [details] [review]
Bug 33672: Don't show item group holds on OPAC if not enabled

This patch adds a check of the syspref 'EnbaleItemGroupHolds' to the
opac request form

To test:
1 - Enable 'EnableItemGroups' system preference
2 - On staff client, view a record details
3 - Go to 'Item groups' tab, add a enw group
4 - On holdings tab, select one or more items and add to group
5 - View record in OPAC
6 - PLace a hold
7 - Note group option is visible
8 - Apply patch
9 - Refresh, no group option
10 - Enable 'EnableItemGroupHolds' system preference
11 - Refresh opac page, note group option is visible

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2023-05-04 21:18:27 UTC
Simple template fix, thx Nick!
Comment 6 Tomás Cohen Arazi 2023-05-09 14:48:19 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Matt Blenkinsop 2023-05-15 12:21:25 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 8 Lucas Gass 2023-06-15 18:56:05 UTC
Missing dependencies for 22.05.x, no backport.