Shelving locations with items attached can be deleted

Bug #1910546 reported by Elaine Hardy
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned
3.8
Fix Released
High
Unassigned

Bug Description

PINES is seeing this behavior in 3.4 and 3.6. Shelving locations with items attached can be deleted in local admin. While they remain in the list, deleted shelving locations have the deleted flag set to yes and any items with that shelving location do not show up in OPAC holding lists.

Shelving locations with active items attached should not delete.

tags: added: admin-pages
Revision history for this message
Michele Morgan (mmorgan) wrote :

Confirmed in 3.6. Marking bug 1910472 as a duplicate of this, since the real problem is not one of messaging, the deletion is succeeding when it shouldn't be.

Changed in evergreen:
status: New → Confirmed
importance: Undecided → High
Michele Morgan (mmorgan)
tags: added: cataloging
Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :

Here's a patch:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1910546-reject-active-acpl-delete

---

Raise a database exception when any attempt is made to mark a copy location as deleted when the location contains non-deleted copies.

To Test:

1. Navigate to /eg2/staff/admin/local/asset/copy_location

2. Attempt to delete a copy location that is known to contain non-deleted copies.

3. Confirm an error message is displayed and the location is not marked as deleted.

Changed in evergreen:
milestone: none → 3.9.1
assignee: Bill Erickson (berick) → nobody
tags: added: pullrequest
Revision history for this message
Tiffany Little (tslittle) wrote :

Bill, is the error message to the user intended to display the "Copy location % contains active copies and cannot be deleted"? Or is that only for the logs? I tested this for BSW and did get the desired behavior of not deleting the shelving location, but just got a generic red toast that the action failed or was disallowed.

I just wanted to be sure what error I should be getting before signing off on it.

Revision history for this message
Bill Erickson (berick) wrote :

Tiffany, the error is only meant to appear in the logs.

Revision history for this message
Tiffany Little (tslittle) wrote :

Ok, thanks Bill!

I have tested this code and consent to signing off on it with my name, Tiffany Little and my email address, <email address hidden>.

tags: added: signedoff
Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Revision history for this message
Michele Morgan (mmorgan) wrote :

Pushed to master, rel_3_9 and rel_3_8.

Thanks Bill and Tiffany!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Michele Morgan (mmorgan) → 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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.