Bug 15876 - Removing a course-reserved item with no initial shelving location does not revert items.location to NULL
Summary: Removing a course-reserved item with no initial shelving location does not re...
Status: RESOLVED DUPLICATE of bug 10382
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: 3.20
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Baptiste
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-22 11:11 UTC by Theodoros Theodoropoulos
Modified: 2018-02-01 19:19 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theodoros Theodoropoulos 2016-02-22 11:11:28 UTC
(This happens only when one changes the shelving location while the item is on a course_reserve)

Steps to replicate:

1) Find an item with NO shelving location info (ie one that has items.location=items.permanent_location=NULL in the DB and the OPAC/Intranet shows an empty string)
2) Add this item to a course reserve
3) Either when adding the item in the course reserve, or at a later stage CHANGE (from the course reserve screen!) the 'temporary' shelving location info that will be used by that course reserve, by selecting a value from the drop-down list. Let's say 'On Display'
4) Find the item in the OPAC or Intranet, the change is displayed (as expected)
5) REMOVE this specific item from the course reserve
6) Find the item again in the OPAC or Intranet. All the course-reserve related information is reverted back to the original values as expected, except the shelving location, which is NOT reverted back to 'empty'. The old value (in our example 'On Display') is still shown!.

FYI, NULL is added from items.location to course_items.location in step 2 as expected
However, that NULL value in NOT copied back to items.location or items.permanent_location in step 5 as expected, but instead the value from step 3 is retained.

(I have verified this behavior both with 3.20 and 3.22)
Comment 1 Baptiste 2017-06-15 13:16:45 UTC
This behaviour is common for all location changes:

In the code in C4/Items.pl  -> _do_column_fixes_for_mod, is is explicitely written that any change in item.location (except toward 'CART' and 'PROC'), if permanent_location is empty, it will be populated.

The question is now to know, is it pertinent to add an exception and not run this function for location in case of reserve course, but I don't think so.
Comment 2 Kyle M Hall 2018-02-01 19:19:54 UTC

*** This bug has been marked as a duplicate of bug 10382 ***