Bug 33399 - Improve checks of other items to determine if this is a valid recall
Summary: Improve checks of other items to determine if this is a valid recall
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on: 19532
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-04 04:26 UTC by Aleisha Amohia
Modified: 2024-08-21 16:43 UTC (History)
3 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:
Circulation function: recalls


Attachments
Bug 33399: [WIP] Improve checks of other items to determine if valid recall (2.26 KB, patch)
2023-04-04 04:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 33399: Improve checks of other items to determine if valid recall (6.15 KB, patch)
2023-10-13 01:45 UTC, Aleisha Amohia
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-04-04 04:26:23 UTC
One of the circulation rules relating to recalls is 'on shelf recalls' - this can either be 'if any unavailable' or 'if all unavailable'.

When checking if a recall is valid, we check this circ rule and count how many items are checked out to determine if we satisfy this criteria. However, items that are checked out are not the only items that are unavailable to be recalled.

Items that are lost, withdrawn or notforloan are unavailable to be recalled too. These are already excluded.

We should also exclude items that:
- are allocated to holds i.e. awaiting pickup for a hold
- not allowed to be recalled i.e. recallsallowed =
Comment 1 Aleisha Amohia 2023-04-04 04:53:21 UTC
Created attachment 149112 [details] [review]
Bug 33399: [WIP] Improve checks of other items to determine if valid recall

This patch employs the following checks to determine if it is valid for a patron to place a recall:
- that we don't include items already allocated to a hold (i.e. hold 'is found') when counting for recallable items
- that we don't include items that aren't allowed to be recalled (based on the recallsallowed circulation rule) when counting for recallable items

Test plan coming
Comment 2 Aleisha Amohia 2023-10-13 01:45:49 UTC
Created attachment 157008 [details] [review]
Bug 33399: Improve checks of other items to determine if valid recall

This patch employs the following checks to determine if it is valid for a patron to place a recall:
- that we don't include items already allocated to a hold (i.e. hold 'is found') when counting for recallable items
- that we don't include items that aren't allowed to be recalled (based on the recallsallowed circulation rule) when counting for recallable items

To test:

1. Enable the UseRecalls system preference and configure the relevant recalls circulation and fines rules. Set 'on shelf recalls allowed' to all which means all recallable items must be unavailable in order to place recalls.
2. Create a biblio (Biblio A) with 2 items (Item A and Item B). Items A and B should have different item types.
3. Check out Item A to another patron (Patron B)
4. Log into the OPAC as Patron A in a second tab
5. Search for Biblio A and try to recall. You should be blocked because Item B could still be checked out so can't be recalled
6. Place a hold on Item B for a third patron (Patron C)
7. Check in Item B so that you're prompted about the hold, confirm the hold as waiting for Patron C
8. Go back to your OPAC tab as Patron A and try to recall. You should be blocked again because Koha thinks Item B is still available --> BUG
9. Cancel the hold on Item B
10. Go to your circulation rules and create a new rule specifically for the Item B itemtype. Set 'recalls allowed' to 0 for this item type. 'Recalls allowed' for the Item A itemtype should still be more than 0.
11. Go back to your OPAC tab as Patron A and try to recall. You should be blocked again because Koha thinks Item B can be recalled still --> BUG

Apply patch and restart services.

12. Run through test plan again from steps 4 to 11. Instead of being blocked, you should be able to place your recall in both cases, because Koha will no longer recognise those items as recallable.

Sponsored-by: Auckland University of Technology
Comment 3 Matthias Le Gac 2024-01-11 22:00:46 UTC
Hi, 

I followed the plan test all it's work until I apply the patch when I do again the step 4 I have again the message "There are no items available for recall".