Bug 40613 - Allow ungrouping holds
Summary: Allow ungrouping holds
Status: Pushed to main
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: Andrew Fuerste-Henry
URL:
Keywords: release-notes-needed
Depends on: 40552
Blocks:
  Show dependency treegraph
 
Reported: 2025-08-07 16:04 UTC by Pedro Amorim
Modified: 2025-11-07 17:58 UTC (History)
9 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40613: Add DELETE hold groups REST API endpoint (7.48 KB, patch)
2025-08-07 16:07 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40613: Add 'ungroup holds' button (3.59 KB, patch)
2025-08-07 16:07 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40613: Add DELETE hold groups REST API endpoint (7.63 KB, patch)
2025-08-11 05:33 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 40613: Add 'ungroup holds' button (3.74 KB, patch)
2025-08-11 05:33 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 40613: Add DELETE hold groups REST API endpoint (7.50 KB, patch)
2025-11-04 09:38 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40613: Add 'ungroup holds' button (3.74 KB, patch)
2025-11-04 09:38 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40613: Add DELETE hold groups REST API endpoint (7.56 KB, patch)
2025-11-04 14:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40613: Add 'ungroup holds' button (3.81 KB, patch)
2025-11-04 14:56 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40613: (QA follow-up): Add hold_group_id param (967 bytes, patch)
2025-11-05 15:20 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-08-07 16:04:21 UTC

    
Comment 1 Pedro Amorim 2025-08-07 16:07:00 UTC
Created attachment 185230 [details] [review]
Bug 40613: Add DELETE hold groups REST API endpoint

prove t/db_dependent/api/v1/patrons_hold_groups.t
Comment 2 Pedro Amorim 2025-08-07 16:07:03 UTC
Created attachment 185231 [details] [review]
Bug 40613: Add 'ungroup holds' button

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 'ungroup holds' button exist.
10) Click that button, ensure it deletes the holde group. Test with more holds, more groups, etc.
Comment 3 OpenFifth Sandboxes 2025-08-11 05:33:24 UTC
Created attachment 185298 [details] [review]
Bug 40613: Add DELETE hold groups REST API endpoint

prove t/db_dependent/api/v1/patrons_hold_groups.t

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 4 OpenFifth Sandboxes 2025-08-11 05:33:26 UTC
Created attachment 185299 [details] [review]
Bug 40613: Add 'ungroup holds' button

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 'ungroup holds' button exist.
10) Click that button, ensure it deletes the holde group. Test with more holds, more groups, etc.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 5 Pedro Amorim 2025-11-04 09:31:29 UTC
Tagging Andrew Fuerste-Henry for QA and adding rel_25_11 candidate here as all other feature 'hold groups' bugs have been pushed, it would make sense that this tiny last one also makes the cut.
Comment 6 Pedro Amorim 2025-11-04 09:38:17 UTC
Created attachment 189008 [details] [review]
Bug 40613: Add DELETE hold groups REST API endpoint

prove t/db_dependent/api/v1/patrons_hold_groups.t

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 7 Pedro Amorim 2025-11-04 09:38:19 UTC
Created attachment 189009 [details] [review]
Bug 40613: Add 'ungroup holds' button

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 'ungroup holds' button exist.
10) Click that button, ensure it deletes the holde group. Test with more holds, more groups, etc.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 8 Pedro Amorim 2025-11-04 09:38:42 UTC
Rebased + squashed forbidden pattern fix
Comment 9 Andrew Fuerste-Henry 2025-11-04 14:55:57 UTC
Created attachment 189014 [details] [review]
Bug 40613: Add DELETE hold groups REST API endpoint

prove t/db_dependent/api/v1/patrons_hold_groups.t

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 10 Andrew Fuerste-Henry 2025-11-04 14:56:00 UTC
Created attachment 189015 [details] [review]
Bug 40613: Add 'ungroup holds' button

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 'ungroup holds' button exist.
10) Click that button, ensure it deletes the holde group. Test with more holds, more groups, etc.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 11 Lucas Gass (lukeg) 2025-11-05 14:09:53 UTC
With this patchset applied:


prove xt/api.t
xt/api.t .. 1/8 
    #   Failed test 'Validation exit code is 0'
    #   at xt/api.t line 103.
    #          got: '256'
    #     expected: '0'
    # Validation failed. /paths/patrons/{patron_id}/hold_groups/{hold_group_id}/delete is missing path parameter(s) for {hold_group_id}
Comment 12 Pedro Amorim 2025-11-05 15:20:50 UTC
Created attachment 189076 [details] [review]
Bug 40613: (QA follow-up): Add hold_group_id param

This now passes:
prove xt/api.t
Comment 13 Lucas Gass (lukeg) 2025-11-07 17:56:02 UTC
Nice work everyone!

Pushed to main for 25.11