Bug 22142 - An item's current location changes to blank when it is removed from Course Reserves
Summary: An item's current location changes to blank when it is removed from Course Re...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 22984 (view as bug list)
Depends on: 10382
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-16 14:55 UTC by Kelly McElligott
Modified: 2019-08-13 10:33 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 22142: Highlight the issue (3.94 KB, patch)
2019-06-13 14:20 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22142: Do not revert data if 'unchanged' was set (1.24 KB, patch)
2019-08-05 15:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22142: Highlight the issue (3.74 KB, patch)
2019-08-12 12:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22142: Do not revert data if 'unchanged' was set (1.31 KB, patch)
2019-08-12 12:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22142: Highlight the issue (3.78 KB, patch)
2019-08-13 05:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22142: Do not revert data if 'unchanged' was set (1.35 KB, patch)
2019-08-13 05:55 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 Kelly McElligott 2019-01-16 14:55:16 UTC
When removing items from a course reserve, Koha is removing the current location field unless the current location was modified when it was added to the course.

Steps:
1.Add an item to an existing active course reserve.
2. Modify Item Type, Shelving Location, Collection code
3.  Confirm these changes were made to the item,
4. Remove this item from an active course reserve.
5. See that the item type, shelving location and collection code was reverted to its original value, however, see that the Current Location is now empty.



Steps:
1.Add an item to an existing active course reserve.
2. Modify Item Type, Shelving Location, Collection code, and Holding Library
3.  Confirm these changes were made to the item,
4. Remove this item from an active course reserve.
5. See that the item type, shelving location and collection code was reverted to its original place, however, see that the Current Location correctly added back.


This is happening on 18.05.06, 18.05.07 and 18.11
Comment 1 Séverine Queune 2019-02-27 09:59:06 UTC
I've got a slightly different problem on 18.05.00 (and on the demo Koha of Biblibre 18.05.06.000 and 18.11.03.000) : on step 5, after removing an item of a course reserve, all fields modified in the course reserve are applied, and none of of the original values are kept.
Comment 2 Nick Clemens 2019-06-12 20:21:14 UTC
This is confirmed on master:

Add an item to a course (active or inactive) change no fields, remove it from the course, itemtype, location and collection are cleared

Add it again, this time changing all the fields, then remove it. Those fields are all set!
Comment 3 Nick Clemens 2019-06-13 14:20:43 UTC
Created attachment 90577 [details] [review]
Bug 22142: Highlight the issue
Comment 4 Katrin Fischer 2019-07-10 06:19:55 UTC
*** Bug 22984 has been marked as a duplicate of this bug. ***
Comment 5 Katrin Fischer 2019-07-10 06:21:35 UTC
We are losing data here... any chance for a fix?
Comment 6 Jonathan Druart 2019-08-05 15:55:32 UTC
Created attachment 92015 [details] [review]
Bug 22142: Do not revert data if 'unchanged' was set
Comment 7 Jonathan Druart 2019-08-05 15:56:07 UTC
Here is a quick try, tests are passing so it should fix the reported issues.
Comment 8 Kyle M Hall 2019-08-12 12:32:59 UTC
Created attachment 92152 [details] [review]
Bug 22142: Highlight the issue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall 2019-08-12 12:33:52 UTC
Created attachment 92153 [details] [review]
Bug 22142: Do not revert data if 'unchanged' was set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Katrin Fischer 2019-08-13 05:55:39 UTC
Created attachment 92168 [details] [review]
Bug 22142: Highlight the issue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2019-08-13 05:55:43 UTC
Created attachment 92169 [details] [review]
Bug 22142: Do not revert data if 'unchanged' was set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2019-08-13 05:56:15 UTC
Really glad to see this one resolved!
Comment 13 Martin Renvoize 2019-08-13 10:33:34 UTC
Nice work!

Pushed to master for 19.11.00