Bug 41467

Summary: When transfer not allowed the 'Originating branch' is not populated
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41467: Return from branch for transfer NotAllowed
Bug 41467: Return from branch for transfer NotAllowed

Description Nick Clemens (kidclamp) 2025-12-17 14:06:59 UTC
To recreate:
1 - SET syspref UseBranchTransferLimits/BranchTransferLimitsType
    To Enfore based on collection
2 - Administration->Library Transfer limits click (Advanced editor)
3 - Uncheck Centerville->Fairfield for 'Fiction'
4 - Find or create a Fiction item at centerville
5 - Circulation->Transfer
6 - Attempt to transfer item to Fairfield
7 - Note 'Originating library' is blank
Comment 1 Nick Clemens (kidclamp) 2025-12-17 14:09:15 UTC
Created attachment 190583 [details] [review]
Bug 41467: Return from branch for transfer NotAllowed

This patch adds the from branch to the returned error and simplifies
the logic of the test

We have effective_itemtype so don't need a conditional based on item type level

To test:
 1 - SET syspref UseBranchTransferLimits/BranchTransferLimitsType
    To Enfore based on collection
 2 - Administration->Library Transfer limits click (Advanced editor)
 3 - Uncheck Centerville->Fairfield for 'Fiction'
 4 - Find or create a Fiction item at centerville
 5 - Circulation->Transfer
 6 - Attempt to transfer item to Fairfield
 7 - Note 'Originating library' is blank
 8 - Apply patch
 9 - Restart all
10 - Attempt transfer again
11 - Error is fully populated
Comment 2 Roman Dolny 2025-12-20 12:44:50 UTC
Created attachment 190653 [details] [review]
Bug 41467: Return from branch for transfer NotAllowed

This patch adds the from branch to the returned error and simplifies
the logic of the test

We have effective_itemtype so don't need a conditional based on item type level

To test:
 1 - SET syspref UseBranchTransferLimits/BranchTransferLimitsType
    To Enfore based on collection
 2 - Administration->Library Transfer limits click (Advanced editor)
 3 - Uncheck Centerville->Fairfield for 'Fiction'
 4 - Find or create a Fiction item at centerville
 5 - Circulation->Transfer
 6 - Attempt to transfer item to Fairfield
 7 - Note 'Originating library' is blank
 8 - Apply patch
 9 - Restart all
10 - Attempt transfer again
11 - Error is fully populated

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>