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: CLOSED FIXED
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: 2020-11-30 21:45 UTC (History)
14 users (show)

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


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
Comment 14 Liz Rea 2019-08-27 19:12:15 UTC
Any chance to backport this to 19.05/18.11?
Comment 15 Fridolin Somers 2019-08-28 13:27:18 UTC
Pushed to 19.05.x for 19.05.03
Comment 16 Lucas Gass 2019-08-28 15:26:09 UTC
backported to 18.11.x for 18.11.09