Bug 34722 - All items display as recalled when an item-level recall is made
Summary: All items display as recalled when an item-level recall is made
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Aleisha Amohia
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 19532
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-05 23:30 UTC by Aleisha Amohia
Modified: 2024-07-04 20:40 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11
Circulation function:


Attachments
Bug 34722: Prevent other items from displaying to fill item-level recalls (3.52 KB, patch)
2023-09-06 00:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 34722: Prevent other items from displaying to fill item-level recalls (3.56 KB, patch)
2023-09-17 20:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 34722: Prevent other items from displaying to fill item-level recalls (3.90 KB, patch)
2023-09-17 20:55 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2023-09-05 23:30:05 UTC
When a recall is requested on a specific item, all holdings on the record show a 'recalled by (borrower)' message on the staff interface catalogue detail page. That message should only show for the specific item.
Comment 1 Aleisha Amohia 2023-09-05 23:46:35 UTC
I've confirmed a similar thing shows on the OPAC, if an item-level recall is made, and someone else tries to place a recall on the same record, the message 'recalled by patron' shows for every item.
Comment 2 Aleisha Amohia 2023-09-06 00:21:32 UTC
Created attachment 155245 [details] [review]
Bug 34722: Prevent other items from displaying to fill item-level recalls

This patch prevents other items attached to a record from being displayed as 'recalled' by item-level recalls.

To test:
1. Ensure UseRecalls system preference is enabled and circulation rules relevant to recalls are configured. Set 'on shelf recalls allowed' circulation rule 'if any unavailable' for ease of testing.
2. Search for a record that has multiple items, or create one with multiple items. Check out two of the items (Item A and Item B) to a patron, Patron A.
3. Log into the OPAC as another patron, Patron B. Search for the record and place a recall. Choose to recall a specific item and select Item A.
4. Go back to the staff interface and view the catalogue detail page for the record. Notice that every item has a 'recalled by...' message, even though Item A was specifically recalled.
5. Log into the OPAC as another patron, Patron C. Search for the record and place a recall. Choose to recall a specific item, notice every item has a 'recalled by...' message. Select Item B and Confirm.
6. In your terminal, the 'Other items are not returned for item-level recalls' test should fail when running
prove t/db_dependent/Koha/Item.t

7. Apply the patch and restart services

8. Confirm tests at t/db_dependent/Koha/Item.t now pass
9. Refresh the staff interface, confirm only Items A and B have the recalled message and the recall patron information for each item is accurate
10. Log into the OPAC as another patron, Patron D. Search for the record and place a recall. Choose to recall a specific item. Confirm only Items A and B have the recalled message.

Sponsored-by: Toi Ohomai Institute of Technology
Comment 3 David Nind 2023-09-17 20:13:14 UTC
Created attachment 155763 [details] [review]
Bug 34722: Prevent other items from displaying to fill item-level recalls

This patch prevents other items attached to a record from being displayed as 'recalled' by item-level recalls.

To test:
1. Ensure UseRecalls system preference is enabled and circulation rules relevant to recalls are configured. Set 'on shelf recalls allowed' circulation rule 'if any unavailable' for ease of testing.
2. Search for a record that has multiple items, or create one with multiple items. Check out two of the items (Item A and Item B) to a patron, Patron A.
3. Log into the OPAC as another patron, Patron B. Search for the record and place a recall. Choose to recall a specific item and select Item A.
4. Go back to the staff interface and view the catalogue detail page for the record. Notice that every item has a 'recalled by...' message, even though Item A was specifically recalled.
5. Log into the OPAC as another patron, Patron C. Search for the record and place a recall. Choose to recall a specific item, notice every item has a 'recalled by...' message. Select Item B and Confirm.
6. In your terminal, the 'Other items are not returned for item-level recalls' test should fail when running
prove t/db_dependent/Koha/Item.t

7. Apply the patch and restart services

8. Confirm tests at t/db_dependent/Koha/Item.t now pass
9. Refresh the staff interface, confirm only Items A and B have the recalled message and the recall patron information for each item is accurate
10. Log into the OPAC as another patron, Patron D. Search for the record and place a recall. Choose to recall a specific item. Confirm only Items A and B have the recalled message.

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-09-17 20:19:10 UTC
Testing notes (using KTD):

1. For me, the tests didn't fail in step 6. They continued to pass after the patch was applied.

2. Setup of circulation and charges rules:
   . Recalls allowed (total): 5
   . Recalls per record (count): 5
   . On shelf recalls allowed: if any unavailable
   . Recall due date interval (day): 3
   . Recall overdue fine amount: 5
   . Recall pickup period (day): 3

3. I used record 146 (The definitive guide to Catalyst) and changed three patrons so they were all members of the Fairview library.
Comment 5 Katrin Fischer 2023-09-17 20:53:25 UTC
Noticed the patch has a hotmail email address:
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 6 Katrin Fischer 2023-09-17 20:55:18 UTC
Created attachment 155765 [details] [review]
Bug 34722: Prevent other items from displaying to fill item-level recalls

This patch prevents other items attached to a record from being displayed as 'recalled' by item-level recalls.

To test:
1. Ensure UseRecalls system preference is enabled and circulation rules relevant to recalls are configured. Set 'on shelf recalls allowed' circulation rule 'if any unavailable' for ease of testing.
2. Search for a record that has multiple items, or create one with multiple items. Check out two of the items (Item A and Item B) to a patron, Patron A.
3. Log into the OPAC as another patron, Patron B. Search for the record and place a recall. Choose to recall a specific item and select Item A.
4. Go back to the staff interface and view the catalogue detail page for the record. Notice that every item has a 'recalled by...' message, even though Item A was specifically recalled.
5. Log into the OPAC as another patron, Patron C. Search for the record and place a recall. Choose to recall a specific item, notice every item has a 'recalled by...' message. Select Item B and Confirm.
6. In your terminal, the 'Other items are not returned for item-level recalls' test should fail when running
prove t/db_dependent/Koha/Item.t

7. Apply the patch and restart services

8. Confirm tests at t/db_dependent/Koha/Item.t now pass
9. Refresh the staff interface, confirm only Items A and B have the recalled message and the recall patron information for each item is accurate
10. Log into the OPAC as another patron, Patron D. Search for the record and place a recall. Choose to recall a specific item. Confirm only Items A and B have the recalled message.

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidied new code.
Comment 7 Tomás Cohen Arazi (tcohen) 2023-10-04 20:44:03 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-10-06 00:57:07 UTC
Pushed to 23.05.x for 23.05.05
Comment 9 Matt Blenkinsop 2023-10-17 17:36:08 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x