Bug 14811 - Don't set permanent_location to CART or PROC
Summary: Don't set permanent_location to CART or PROC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 13026 13540 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-13 15:36 UTC by Katrin Fischer
Modified: 2016-06-21 21:38 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14811: Do not update permanent_location if location is CART or PROC (796 bytes, patch)
2015-09-14 14:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14811: Don't update permanent_location with CART or PROC (2.78 KB, patch)
2015-09-14 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14811: Don't update permanent_location with CART or PROC (2.83 KB, patch)
2015-09-25 18:42 UTC, Josef Moravec
Details | Diff | Splinter Review
[PASSED QA] Bug 14811: Don't update permanent_location with CART or PROC (2.90 KB, patch)
2015-09-29 21:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***