Bug 14811

Summary: Don't set permanent_location to CART or PROC
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart, josef.moravec, kyle.m.hall, liz, olli-antti.kivilahti, tmisilo, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7634
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14811: Do not update permanent_location if location is CART or PROC
Bug 14811: Don't update permanent_location with CART or PROC
Bug 14811: Don't update permanent_location with CART or PROC
[PASSED QA] Bug 14811: Don't update permanent_location with CART or PROC

Description Katrin Fischer 2015-09-13 15:36:37 UTC
If a library is using the ReturnToShelvingCart feature, items returned are set to the location = CART and the permanend_location is used to store the normal location, that it will be reset to later via a cronjob.

But: If you edit the item while it's still CART, the 'normal location' in permanent location will ber overwritten with CART.  :(

So: When the location is CART, don't update permanent location!
Comment 1 Jonathan Druart 2015-09-14 14:40:30 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-09-14 14:41:50 UTC
Just a quick try to know if it is something like that you expected.
I am not sure to understand the NewItemsDefaultLocation pref, should it affect item when it's edited?
Comment 3 Jonathan Druart 2015-09-14 14:42:24 UTC
Ok forget that, I've read too quickly the code.
Comment 4 Jonathan Druart 2015-09-14 15:03:03 UTC
*** Bug 13026 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Druart 2015-09-14 15:06:39 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-09-14 15:07:08 UTC
At least major!
Comment 7 Josef Moravec 2015-09-25 18:42:25 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2015-09-29 21:21:52 UTC
Created attachment 42963 [details] [review]
[PASSED QA] Bug 14811: Don't update permanent_location with CART or PROC

The permanent_location should not be set to CART or PROC when the item
is edited.
Otherwise we lost an important info.

Test plan:
0/ Set the ReturnToShelvingCart pref
1/ Create an item with location "on_my_shelf"
2/ Check the item in and out
3/ Look at the DB values, location should be "CART" and
permanent_location unchanged (on_my_shelf)
4/ Edit the item, add a note for instance
5/ Without this patch, the permanent_location is erased with 'CART' and
you have definitely lost the info.
With this patch, the permanent_location is unchanged.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Tomás Cohen Arazi 2015-10-02 17:40:43 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 10 Chris Cormack 2015-10-23 08:13:07 UTC
Pushed to 3.20.x will be in 3.20.5
Comment 11 Liz Rea 2015-11-02 21:03:56 UTC
Pushed to 3.18.x, is in 3.18.12.
Comment 12 Josef Moravec 2015-11-07 08:15:56 UTC
*** Bug 13540 has been marked as a duplicate of this bug. ***