Bug 20419 - Current location not updated correctly on the return of an item on hold
Summary: Current location not updated correctly on the return of an item on hold
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Hayley Pelham
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-15 00:39 UTC by Alex Buckley
Modified: 2020-11-30 21:44 UTC (History)
7 users (show)

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


Attachments
Bug 20419 - Removed updating of holdingbranch in ModItemTransfer() (1.63 KB, patch)
2018-03-15 01:00 UTC, Alex Buckley
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2018-03-15 00:39:23 UTC
At present when a reserved item is returned to a library branch which is not the branch set as the pickup location for the reserve then after clicking the 'Confirm hold and transfer' button on the return modal box the items current location is set to the pickup location even though the item is actually in transit. 

The current location of the item should be set as the branch that the item was returned to whilst in transit and only change to the pickup location when it checked in at the pickup location branch.
Comment 1 Alex Buckley 2018-03-15 01:00:37 UTC
Created attachment 72899 [details] [review]
Bug 20419 - Removed updating of holdingbranch in ModItemTransfer()

The call to ModItem to update the holdingbranch has been removed from
the ModItemTransfer function in C4/Items.pm this is because the
holdingbranch should only be changed when the item is checked in at the
destination branch not whilst it is in transit.

Test plan:
1. Ensure the system preference AutomaticItemReturn is set to 'Dont'

2. Place a reserve on an item to be picked up at branch b

3. Check out the item to a different patron

4. Check the item back in to branch a

5. Select 'Confirm hold and transfer' button in the modal box that
appears

6. Notice that the current location of the item visible on the item tab
of the detail.pl page of the record is set as branch b even though the
item is in transit

7. Apply patch

8. Restart apache2, memcached and plack (if it is enabled)

9. Repeat steps 1, 2, 3, 4, 5 and notice that the current location is set
to branch a

10. Check the item in at branch b and notice that the current location
of the item is now branch b

Sponsored-By: Catalyst IT
Comment 2 Mark Tompsett 2018-04-02 02:09:56 UTC
Please include unit tests when modifying C4 or Koha libraries. This prevents regression. It would be nice if they fail before the fix, and then pass after the fix.
Comment 3 Aleisha Amohia 2020-02-13 02:21:22 UTC
I believe this has been fixed in master. Can someone else confirm that this is no longer a bug?