Bug 40552 - Allow selecting all holds from a group
Summary: Allow selecting all holds from a group
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Testopia
URL: https://github.com/openfifth/koha/com...
Keywords:
Depends on: 40517 40529
Blocks: 40550 40551 40613
  Show dependency treegraph
 
Reported: 2025-07-30 11:50 UTC by Pedro Amorim
Modified: 2025-08-18 20:03 UTC (History)
8 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40552: Preparation: Move patron page logic for reusability (2.25 KB, patch)
2025-07-30 11:56 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552: Allow selecting all holds from a group (3.70 KB, patch)
2025-07-30 11:56 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552: Preparation: Move patron page logic for reusability (2.25 KB, patch)
2025-08-06 09:17 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552: Allow selecting all holds from a group (3.70 KB, patch)
2025-08-06 09:17 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552: Preparation: Move patron page logic for reusability (2.40 KB, patch)
2025-08-06 10:09 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 40552: Allow selecting all holds from a group (3.84 KB, patch)
2025-08-06 10:09 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 40552: Preparation: Move patron page logic for reusability (2.40 KB, patch)
2025-08-06 10:24 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552: Allow selecting all holds from a group (4.03 KB, patch)
2025-08-06 10:24 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40552 test plan video0 (1.79 MB, video/mp4)
2025-08-06 10:26 UTC, Pedro Amorim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-07-30 11:50:25 UTC

    
Comment 1 Pedro Amorim 2025-07-30 11:56:08 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2025-07-30 11:56:11 UTC Comment hidden (obsolete)
Comment 3 Anneli Österman 2025-08-06 06:49:51 UTC
I tried to test this (after enabling DisplayAddHoldGroups system preference) on Open Fifth's sandbox but there were some problems:

* when I tried to group holds in the Holds tab the Group button after the "Group selected" button did not work. Nothing happened when I clicked it.
* I managed to group holds while making them with "Treat as hold group:" selection but when I went to the patron's Holds tab and clicked on the hold group's number, a modal opened but there were no "select group holds" button there. Or anywhere else as far as I could see.
Comment 4 Pedro Amorim 2025-08-06 09:17:40 UTC Comment hidden (obsolete)
Comment 5 Pedro Amorim 2025-08-06 09:17:42 UTC Comment hidden (obsolete)
Comment 6 Pedro Amorim 2025-08-06 09:21:11 UTC
(In reply to Anneli Österman from comment #3)
> I tried to test this (after enabling DisplayAddHoldGroups system preference)
> on Open Fifth's sandbox but there were some problems:
> 
> * when I tried to group holds in the Holds tab the Group button after the
> "Group selected" button did not work. Nothing happened when I clicked it.
> * I managed to group holds while making them with "Treat as hold group:"
> selection but when I went to the patron's Holds tab and clicked on the hold
> group's number, a modal opened but there were no "select group holds" button
> there. Or anywhere else as far as I could see.

Hi Anneli, thank you so much for testing.
I've updated the dependency tree to include bug 40529. This bug doesn't logically depend on that, but they both touch the same code so having this depend on bug 40529 ensures the patches are applied nicely.

I've re-followed the test plan myself to confirm it still works as described.

Please have another go at it when convenient for you. I've pushed the following branch that can be used in case this doesn't apply again the next time you're available to test it:
https://github.com/openfifth/koha/commits/b_40552/
Comment 7 OpenFifth Sandboxes 2025-08-06 10:09:01 UTC
Created attachment 185144 [details] [review]
Bug 40552: Preparation: Move patron page logic for reusability

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 8 OpenFifth Sandboxes 2025-08-06 10:09:04 UTC
Created attachment 185145 [details] [review]
Bug 40552: Allow selecting all holds from a group

Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
7) Click the 'Holds' tab.
8) Test that selecting the hold group number opens the hold group modal and a new 'select group holds' buttons exist.
9) Click that button, ensure it selects the group holds. Test with more holds, more groups, unselecting all beforehand, selecting all beforehand, etc.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 9 Anneli Österman 2025-08-06 10:12:21 UTC
Thank you Pedro!

The 'select group holds' button appeared now and selecting and unselecting worked as expected.

I do not know if this is relevant but the Group button I mentioned earlier still did not work. But I decided to sign this off anyway. :)
Comment 10 Pedro Amorim 2025-08-06 10:24:12 UTC
Created attachment 185146 [details] [review]
Bug 40552: Preparation: Move patron page logic for reusability

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 11 Pedro Amorim 2025-08-06 10:24:15 UTC
Created attachment 185147 [details] [review]
Bug 40552: Allow selecting all holds from a group

Test plan, k-t-d, patches applied:
1) Search for 'test':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
7) Click the 'Holds' tab.
8) Click the top most checkbox to select all holds. Click the 'group selected' button. Notice the holds are grouped and the 'group hold' column shows the hold group number accordingly.
9) Test that selecting the hold group number opens the hold group modal and a new 'select group holds' buttons exist.
10) Click that button, ensure it selects the group holds. Test with more holds, more groups, unselecting all beforehand, selecting all beforehand, etc.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 12 Pedro Amorim 2025-08-06 10:26:27 UTC
Created attachment 185148 [details]
Bug 40552 test plan video0

(In reply to Anneli Österman from comment #9)
> Thank you Pedro!
> 
> The 'select group holds' button appeared now and selecting and unselecting
> worked as expected.
> 
> I do not know if this is relevant but the Group button I mentioned earlier
> still did not work. But I decided to sign this off anyway. :)

Hi Anneli, thank you once again. I've updated the test plan slightly to make it a bit simpler to follow and highlight to click the 'group' button.

Attached is a short video of me following the test plan and the 'group' button working as intended on my end. Can you please clarify further how/when exactly does it fail for you? Thanks!