[Koha-bugs] [Bug 20283] New: Editing a course item for an inactive course affects the item fields directly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 23 12:12:29 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20283

            Bug ID: 20283
           Summary: Editing a course item for an inactive course affects
                    the item fields directly
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Course reserves
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: nick at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

When adding an item to course reserves the values in the items and course_items
tables are swapped e.g. items.holdingbranch becomes course_items.holdingbranch
and vice versa.

When a course is marked inactive, the values are swapped back.

When editing an inactive course we modify item values directly. This seems to
be because we don't check if the course is active or not. When a course is
active ti is correct to modify the items, but if inactive we should only modify
course_items

To recreate:
1 - Find/create  an item with existing values for:
    item type
    collection code
    shelving location
    holding library
    staff/public note
2 - Add this item to an active course in course reserves, change all the values
3 - Make the course inactive
4 - Edit the course item, changing all the values
5 - Save and note the changes did not populate to the course reserve
6 - View the item, note the item was changed
7 - Edit the course again, note the dropdowns show the course item values, not
the new item values

I think we have two options:
1 - Check if a course it active when modifiying a course reserve and adjust the
correct table
2 - Don't allow editing of items for inactive courses

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list