Line item deleting silently fails if selection list is owned by another user

Bug #1966096 reported by Eva Cerninakova
22
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.10
Fix Released
Medium
Unassigned
3.11
Fix Released
Medium
Unassigned

Bug Description

If I open a selection list that is owned by another user and try to delete a line item using
     --Actions-- -> Delete Selected Line Items
the selected line item seemingly disappears from the selection list, however, it is not deleted in a fact and remains attached to the bibliographic record (tested in Evergreen 3.6 and 3.8)

There should be dialog box with the warning that line item in selection list owned by another user can't be deleted

Note: I think this issue can be related to the bug 1806494

Eva Cerninakova (ece)
tags: added: acq-selectionlists
tags: added: acq
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Confirmed this is an issue in both 3.7 and 3.9

I think users with acq picklist permissions should be able to delete line items on selection lists owned by other users at their org unit.

Changed in evergreen:
assignee: nobody → Jeff Davis (jdavis-sitka)
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1966096-delete-lineitem-perm-check has a fix:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1966096-delete-lineitem-perm-check

If the line item is attached to a purchase order, this branch will check if you have the CREATE_PURCHASE_ORDER perm at the PO's ordering agency; otherwise, if the line item is attached to a picklist, it will check if you have CREATE_PICKLIST at the picklist's org unit. Either way, acquisitions staff will be able to delete each other's line items, which is new behavior.

No pullrequest yet since the branch needs a bit of testing.

Changed in evergreen:
assignee: Jeff Davis (jdavis-sitka) → nobody
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Rebased to main, ready for pullrequest: working/user/jeffdavis/lp1966096-delete-lineitem-perm-check-rebased / https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1966096-delete-lineitem-perm-check-rebased

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.12-beta
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

I've tested this on our 3.11.1 test server and it works as expected. (Need someone else to test since I'm from the same org as Jeff.)

Revision history for this message
Eva Cerninakova (ece) wrote :

I have tested this on https://bugsquash.mobiusconsortium.org/.

I tried variation of picklist org units, PO ordering agencies and PO states. As Jessica poined, everything works as expected.

I consent to signing off on it with my name, Eva Cerniňáková and my email address, <email address hidden>

tags: added: signedoff
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Jeff, Eva, and Jennifer. Great fix! Pushed to rel_3_10 and above.

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