Bug 30118

Summary: holds_block_checkin behavior is different in Koha and in SIP
Product: Koha Reporter: Matthias Meusburger <matthias.meusburger>
Component: SIP2Assignee: Matthias Meusburger <matthias.meusburger>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, koha, kyle, victor
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:
22.05.00,21.11.05,21.05.14
Circulation function:
Attachments: Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Bug 30118: (QA follow-up) Fix Perl Critic issues

Description Matthias Meusburger 2022-02-17 09:51:22 UTC
In koha interface, a warning is displayed when an item on hold is returned only if the return is for this specific item.

We should have the same behavior in SIP, for consistency.
Comment 1 Matthias Meusburger 2022-02-17 09:52:26 UTC
Created attachment 130703 [details] [review]
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.

In koha interface, a warning is displayed when an item on hold is returned
only if the return is for this specific item.

This patch does the same in SIP: the return is blocked when holds_block_checkin
is enabled and there is a hold on a specific item and this is the very item
being returned.

Test plan:

The following behavior is expected in SIP:

 - An item is returned, and there is a reservation on record-level: block
 - An item is returned, and there is a reservation on this very item: block
 - An item is returned, and there is a reservation on another item: allow
Comment 2 Biblibre Sandboxes 2022-03-30 14:04:27 UTC
Created attachment 132626 [details] [review]
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.

In koha interface, a warning is displayed when an item on hold is returned
only if the return is for this specific item.

This patch does the same in SIP: the return is blocked when holds_block_checkin
is enabled and there is a hold on a specific item and this is the very item
being returned.

Test plan:

The following behavior is expected in SIP:

 - An item is returned, and there is a reservation on record-level: block
 - An item is returned, and there is a reservation on this very item: block
 - An item is returned, and there is a reservation on another item: allow

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Comment 3 Koha Team University Lyon 3 2022-03-30 14:16:22 UTC
Hi,
I tried on my kohadevbox with ./sip_cli_emulator.pl 
I've followed the test plan and it works:
For a reservation at a biblio-level, for the first item returned that is going to fulfill the reservation : it is blocked
For a reservation at a biblio-level, if an item is already waiting for to fulfill the reservation, if you checkin another item : it is not blocked 

For a reservation at an item level, if you checkin another item : it is not blocked 
For a reservation at item level, if you checkin the very item : it is blocked

Sonia
Comment 4 Kyle M Hall (khall) 2022-03-30 16:39:19 UTC
Created attachment 132656 [details] [review]
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.

In koha interface, a warning is displayed when an item on hold is returned
only if the return is for this specific item.

This patch does the same in SIP: the return is blocked when holds_block_checkin
is enabled and there is a hold on a specific item and this is the very item
being returned.

Test plan:

The following behavior is expected in SIP:

 - An item is returned, and there is a reservation on record-level: block
 - An item is returned, and there is a reservation on this very item: block
 - An item is returned, and there is a reservation on another item: allow

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Kyle M Hall (khall) 2022-03-30 16:39:32 UTC
Created attachment 132657 [details] [review]
Bug 30118: (QA follow-up) Fix Perl Critic issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Fridolin Somers 2022-04-08 13:53:28 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 7 Kyle M Hall (khall) 2022-04-15 11:13:04 UTC
Pushed to 21.11.x for 21.11.05
Comment 8 Andrew Fuerste-Henry 2022-04-25 18:44:43 UTC
Pushed to 21.05.x for 21.05.14
Comment 9 Victor Grousset/tuxayo 2022-04-25 20:48:08 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.