Bug 34281 - Transfer limits have no impact on CanBookBeRenewed
Summary: Transfer limits have no impact on CanBookBeRenewed
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Peter Vashchuk
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-14 14:23 UTC by Peter Vashchuk
Modified: 2023-10-26 05:32 UTC (History)
3 users (show)

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


Attachments
Bug 34281: Add logic to CanBookBeRenewed function to check if item can be transferred (7.85 KB, patch)
2023-07-14 15:06 UTC, Peter Vashchuk
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Vashchuk 2023-07-14 14:23:40 UTC Comment hidden (obsolete)
Comment 1 Peter Vashchuk 2023-07-14 14:32:35 UTC
Currently, a book on a separate branch can't be renewed if there's a hold on a different branch on this same book, even if there is a transfer limit that disallows the transfers between those two branches, this is an obvious oversight, as our customers have branches that function as completely separate libraries. Items on one branch should not be dependent on other branches when there is no option for transfer.
Comment 2 Peter Vashchuk 2023-07-14 15:06:17 UTC
Created attachment 153492 [details] [review]
Bug 34281: Add logic to CanBookBeRenewed function to check if item can be transferred

To reproduce:
1. Find or create a biblio that has two items of the same itemtype, one on branch A and another one on branch B
2. Checkout the item on branch A
3. Make a hold on that same branch
4. Checkout the item on branch B
5. Go to the sysprefs and enable UseBranchTransferLimits, after which go to the checkin and transfer policy page and disallow the transfer
6. Try to renew the item on branch B, the koha won't let you renew it
7. Apply the patch
8. Repeat step 6 but this time you should be able to renew an item

Also run the tests prior to applying the patch and then after.
Comment 3 Anneli Österman 2023-10-13 12:28:12 UTC
I tried to test this in PTFS Europe's sandbox but I am unable to reproduce the initial problem. I followed the test plan's steps but I can renew an item without the patch.

Are there other systempreferences or circulation rules that needs to be changed for this problem to appear? 

"go to the checkin and transfer policy page"

Do you mean Library tranfer limits page? I went there and disabled transfer between two branches.

I also tried to enable IndependentBranches system preference but it had no effect on renewing a loan.

I checked CircControl (where the item is from) and HomeOrHoldingbranch (holdingbranch) system preferences and to me they seemed to be the correct ones.
Comment 4 Peter Vashchuk 2023-10-24 09:33:40 UTC
(In reply to Anneli Österman from comment #3)
> "go to the checkin and transfer policy page"
> 
> Do you mean Library tranfer limits page? I went there and disabled transfer
> between two branches.

Yes, that's the one, you need to disable those transfers between the two branches you're working with.

Here's my step by step process of reproducing the bug on PTFS Europe's sandbox:
1. I found a biblio with two items of the same itemtype (there's only two of them, it's important that all the items are checked out), the biblio I will use for this example is "X Power Tools" that has one item on Centerville and one item of the same itemtype on Midway.
2. I checked the item on Centerville.
3. Made a hold for different patron who's also on Centerville.
4. Then I checked out the other item on Midway
5. I went to sysprefs and enabled UseBranchTransferLimits and changed "library transfer limits based on " to "itemtype", after which I went to Library transfer limits page and disallowed the transfers from Centerville to Midway and from Midway to Centerville.
6. I couldn't renew the book from Centerville on the patrons page to whom I checked it out to as it was saying that the book is "On hold".
Comment 5 Anneli Österman 2023-10-26 05:32:50 UTC
I tried this again without the patch with your new instructions and I'm still not sure if I understand correct. If the hold is in Centerville and I try to renew item checked out from Centerville, the renew is blocked by the hold (it does not require a transfer). But if I try to renew the loan made from the Midway, it is possible renew (would require transfer to Centerville). To me this works as it should work, I do not see the original problem.