Inventory: Staff users can update inventory dates on non-owned items

Bug #1940663 reported by Michele Morgan
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

Any staff user can update the inventory date on any item, regardless of item ownership and the staff user's permissions.

Inventory dates can be applied to items in two ways:

- Update Inventory under Actions in Item Status
- Update Inventory checkin modifier set on the Checkin screen

In a consortium environment, using either option, any staff user at any library can update inventory dates for any item.

In our consortium where items travel freely, a library that uses the Update Inventory checkin modifier on their checkin workstations will update inventory on thousands of items they don't own. This will skew reporting for libraries that are attempting to do deliberate inventories on collections.

I can think of a couple of ways to handle this:

- Create an ou setting that, when set, prevents inventory updates on items owned by other org units.

- Create permissions tied to the item's owning library to control which staff users can update inventory at the assigned permission depth.

Possibly, we need both.

Thoughts?

Revision history for this message
Lynn Floyd (lfloyd) wrote :

We suggest that if you do an inventory, when you run the reports, make sure you limit it to your library, as the workstation the inventory was done at is stored in the db.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Michele Morgan (mmorgan) wrote :

Hi Lynn,

Thanks for confirming!

We do limit to the library when reporting, but have realized that if the owning library updates the inventory date, and a different library updates the inventory date later, the owning library's inventory info is replaced by the non-owning library's inventory info, so the original inventory date is lost.

Also, since I'm commenting I'll just add a link to related bug 1883171, which can further complicate reporting.

Revision history for this message
Elaine Hardy (ehardy) wrote :

I do think setting the inventory date should be restricted. In our consortium, we don't typically use the inventory checkin modifier unless doing an inventory so this is less likely to happen. However, I can see where, especially with libraries that need to do frequent inventories, this is a problem.

As an aside, it would be nice if the original inventory date was kept with a most current date that is overwritten at subsequent inventories.

tags: added: inventory
Revision history for this message
Terran McCanna (tmccanna) wrote :

I agree it makes sense to limit the update - for PINES, I think limiting it based on owning library matching workstation library would work, but I could see where that wouldn't necessarily work for systems that had true floating collections.

Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I am working on a proposal to fix this bug, and I have a follow up question to Terran's comment #4.

What should happen if a copy has the floating flag? Should the latest inventory date be updated, even when the copy is not "home?" Should still only be updated when at "home?"

Revision history for this message
Elaine Hardy (ehardy) wrote :

I think it would be preferable to update the inventory date of a floating item at it's current location, especially since the workstation is noted. It seems more efficient than returning all items "home" for inventory.

Revision history for this message
Michele Morgan (mmorgan) wrote :

If a floating item can float to the checkin library, it's circ_lib will get changed to match the checkin library.

In this case, it makes sense to me that the latest inventory would be updated if the Update Inventory checkin modifier is enabled.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Thank you, Elaine and Michele! I will include modifications to the code so that floating items get their inventory date set when not "at home."

Changed in evergreen:
status: Confirmed → In Progress
Revision history for this message
Jason Stephenson (jstephenson) wrote :

A branch which addresses this bug and bug 1883171 is available in the working repository:

user/dyrcona/lp1883171-lp1940663-inventory-date-changes-rebase

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1883171-lp1940663-inventory-date-changes-rebase

The complete change set consists of the top 6 commits on the branch and includes release notes, backend (Perl) code changes, database & IDL changes, web staff client changes, Perl live tests, and pgtap tests for the database changes and functionality.

Changed in evergreen:
status: In Progress → Confirmed
assignee: Jason Stephenson (jstephenson) → nobody
milestone: none → 3.9-beta
tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I have added an additional commit to the branch to address something that came up during testing, so it is now the top 7 commits on the branch. This last one could be squashed into one of the others if desired.

Revision history for this message
Michele Morgan (mmorgan) wrote :

NOBLE has tested this code extensively on both concerto and production data and we are satisfied that it resolves the issues with inventory dates being recorded for items at libraries that do not own them.

My signoff is at:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1883171_lp1940663_inventory_date_changes_signoff

user/mmorgan/lp1883171_lp1940663_inventory_date_changes_signoff

tags: added: signedoff
Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Revision history for this message
Mike Rylander (mrylander) wrote :

Thanks, Jason, Michelle, and all testers/feedback-ers! This is merged to master for 3.9. During the merge I retained the IDL permissions that were extant in master but not represented in the branch. This simply protects against the use of open-ils.pcrud to spuriously add or change inventory entries. I also (as Jason hinted) squashed his late-testing change into the main business logic commit.

NOTE: one potential followup might be to allow the capture of old rows that don't have a workstation attached, though that must be done pre-release, and I admit that I can't find any inventory data in the wild that does not have a workstation.

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
assignee: Mike Rylander (mrylander) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers