Item deletion for cancelling lineitems should check item's status

Bug #1928003 reported by Tiffany Little
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
3.7
Fix Released
Undecided
Unassigned

Bug Description

Witnessed in 3.6.2, although I assume it affects previous versions too.

When you cancel a lineitem, it also deletes any attached copies in the catalog. This is a nice timesaver. However, it blindly deletes those copies, no matter what state they are currently in.

It's entirely possible that line items might need some cleanup work, especially at fiscal year end. In our particular circumstance where this came up, we needed to release encumbrances from line items that were no longer valid. The way to do that is to cancel line items. But in the intervening time, for several reasons, those copies had been cataloged and were in various statuses, including checked out. So when the line items were cancelled, those copies--even the checked out ones--were auto-deleted.

I'm not sure if the solution is to put a check on the item deletion to see if the status is anything other than on-order (would any other statuses need to be included?), or if it should check the item statuses and throw back a confirmation message to let the user know that it will delete those copies? Or if there should be an option to create a cancel reason that doesn't keep debits but does keep copies?

But whatever the solution, it's entirely possible to need to make Acquisitions edits that shouldn't automatically affect the catalog.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Tiffany Little (tslittle) wrote :

Found this old bug that is somewhat related and including it here in case it's useful: https://bugs.launchpad.net/evergreen/+bug/1175740

The original bug report is on a different topic, but it does touch on including an alert before deleting the copies when you're trying to delete/cancel a lineitem.

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

I have a branch here for this:

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

I tested it with statuses Available, Reshelving, In Process, Missing, and Checked Out. When I tested, none of these statuses were auto-deleted. Only copies with the status On order were deleted.

tags: added: pullrequest
Revision history for this message
Christine Morgan (cmorgan-z) wrote :

Tested with statuses In Process, Cataloging, ILL, Bindery, Checked out, and On Hold Shelf. None of these statuses were auto-deleted.

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

tags: added: signedoff
tags: added: acq-lineitem
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.8.1
Revision history for this message
Mike Rylander (mrylander) wrote :

I've pulled this into rel_3_7, rel_3_8, and master for 3.9. Thanks, Tiffany and Christine!

Changed in evergreen:
status: Confirmed → Fix Committed
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

Remote bug watches

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