Bug 39750 - Wrong transfer breaking check in when using library transfer limits
Summary: Wrong transfer breaking check in when using library transfer limits
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 28294
Blocks:
  Show dependency treegraph
 
Reported: 2025-04-25 16:25 UTC by Nick Clemens (kidclamp)
Modified: 2025-04-28 16:54 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:
25.05.00
Circulation function:


Attachments
Bug 39750: Ignore limits when updating WrongTransfer (1.98 KB, patch)
2025-04-25 16:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39750: Ignore limits when updating WrongTransfer (2.03 KB, patch)
2025-04-25 21:11 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39750: Ignore limits when updating WrongTransfer (2.14 KB, patch)
2025-04-28 06:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2025-04-25 16:25:29 UTC
To recreate:
1 - Enable  UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
    CPL -> FFL
    CPL -> IPT
    FFL -> CPL
    FFL -> IPT
    IPT -> CPL
    IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
    ==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
Comment 1 Nick Clemens (kidclamp) 2025-04-25 16:27:58 UTC
Created attachment 181547 [details] [review]
Bug 39750: Ignore limits when updating WrongTransfer

This patch ignores limits when updating a wrong transfer to ensure we can return a book
home when checked in at the wrong branch

To test:
1 - Enable  UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
    CPL -> FFL
    CPL -> IPT
    FFL -> CPL
    FFL -> IPT
    IPT -> CPL
    IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
    ==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
9 - Apply patch, restart all
10 - Check item in again
11 - Success! Transfer updated
Comment 2 Roman Dolny 2025-04-25 21:11:04 UTC
Created attachment 181557 [details] [review]
Bug 39750: Ignore limits when updating WrongTransfer

This patch ignores limits when updating a wrong transfer to ensure we can return a book
home when checked in at the wrong branch

To test:
1 - Enable  UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
    CPL -> FFL
    CPL -> IPT
    FFL -> CPL
    FFL -> IPT
    IPT -> CPL
    IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
    ==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
9 - Apply patch, restart all
10 - Check item in again
11 - Success! Transfer updated

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Martin Renvoize (ashimema) 2025-04-28 06:45:48 UTC
Created attachment 181575 [details] [review]
Bug 39750: Ignore limits when updating WrongTransfer

This patch ignores limits when updating a wrong transfer to ensure we can return a book
home when checked in at the wrong branch

To test:
1 - Enable  UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
    CPL -> FFL
    CPL -> IPT
    FFL -> CPL
    FFL -> IPT
    IPT -> CPL
    IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
    ==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
9 - Apply patch, restart all
10 - Check item in again
11 - Success! Transfer updated

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Katrin Fischer 2025-04-28 16:54:58 UTC
Pushed for 25.05!

Well done everyone, thank you!