Bug 18750

Summary: t/db_dependent/Circulation/Branch.t fails.
Product: Koha Reporter: Mark Tompsett <mtompset>
Component: Test SuiteAssignee: Chris Cormack <chris>
Status: CLOSED INVALID QA Contact: Galen Charlton <gmcharlt>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18750: t/db_dependent/Circulation/Branch.t fails

Description Mark Tompsett 2017-06-07 17:33:44 UTC
prove t/db_dependent/Circulation/Branch.t fails test 12
not ok 12 - AddReturn respects default return policy - return to homebranch

In C4::Circulation, the CanBookBeReturned returns 0 for the wrong branch, but never tests if it is returnable for the right branch. Adding in logic triggers the NeedsTransfer else case near the end of the AddReturn function. It is unclear what else might break as a side-effect of this patch method.

I will put this into Discussion, unless someone else can verify this is the correct way to fix the problem.
Comment 1 Mark Tompsett 2017-06-07 17:38:29 UTC
Created attachment 64085 [details] [review]
Bug 18750: t/db_dependent/Circulation/Branch.t fails

TEST PLAN
---------
prove -v t/db_dependent/Circulation/Branch.t
-- nice kaboom
apply patch
prove -v t/db_dependent/Circulation/Branch.t
-- everything passes
run koha qa test tools

BIG DISCLAIMER EXPLAINING IN DISCUSSION STATUS:
Look for 'WrongBranch' vs 'NeedsTransfer' logic elsewhere
I have not spent time doing this, which is why this
is 'In Discussion'. If it is fully confirmed that it does
not break anywhere else, then and only then feel free to
sign off.
Comment 2 Jonathan Druart 2017-09-27 17:53:53 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2017-09-27 17:54:14 UTC
Tests pass for me, it is certainly more data related than a bug in the logic code.
Comment 4 Martin Renvoize (ashimema) 2019-04-03 11:44:46 UTC
Is this dead now?
Comment 5 Jonathan Druart 2019-05-04 13:54:23 UTC
(In reply to Martin Renvoize from comment #4)
> Is this dead now?

Yes and no, the tests do not longer exist, but the pm code is still there.
As we do not have answer from Mark I would suggest to close this bug report (invalid) and let him reopening it if he thinks it is needed.