Cannot Delete Acquisitions Records Queues

Bug #1289486 reported by Erica Rohlfs on 2014-03-07
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen version 2.4.6, 2.5.2

End-users cannot delete Acquisitions Records queues.

Acquisitions Records queues are accessed via the Cataloging Module:
1. Under the Cataloging menu option, select MARC Batch Import/Export
2. Select Inspect Queue
3. In the Queue Type dropdown option, select Acquisitions Records
4. Select the Acquisitions Records queue that you want to delete
5. At the bottom of your queue list, click Delete Selected
6. You will receive an “Are you sure you want to delete the selected queues?” message, click OK
You will not receive a confirmation that the queue deleted. If you click Reload, then the page will reload and default back to the Bibliographic Records queue, so you must reselect the Acquisitions Records queue. Once back in the Acquisitions Records queue, the queue that you selected for deletion will not be deleted.

One reason for this occurrence may be due to the fact that lineitems refer back to the Acquisitions queues.

Kathy Lussier (klussier) wrote :

Hi Erica,

I tried this on two 2.4x systems, but was unable to replicate it.

After step 6, I don't receive a confirmation that the queue is deleted. However, after a significant delay (you have to wait a while) the screen does refresh on its own with Bibliographic pre-selected. When I click acquisitions, the queue is no longer there. Perhaps you just need to wait a little longer for the screen to refresh?


Erica Rohlfs (erohlfs) wrote :

Hi Kathy,

Thank you for testing this (and catching that duplicate on the other ticket). I’m perplexed as to why you did not receive the “Are You Sure” message. I tested this again and waited 5 minutes. I did not receive a confirmation that the queue deleted, and the screen did not refresh; when I reloaded the screen, the queue was still there. I cannot imagine that all of my lineitems attached to the different queues that I’ve tried to delete are in a state that makes the deletion unsuccessful. Also, a library utilizing version 2.4.3 reported to me that they are unable to delete, as well. Perhaps there is something going on with the lineitems? There definitely needs to be some type of message from Evergreen that the deletion was successful or, if not, why.
Thank you again,

Erica Rohlfs (erohlfs) wrote :

Ugh, I can't edit my comment. I misread (what I get for using my ipad for this stuff). I thought that you did not see the "are you sure." But, I see now that it was after step 6. So sorry.

Kathy Lussier (klussier) wrote :

Hi Erica,

I agree that we should see a confirmation here. I'll do some more testing on my end when I have a chance. Maybe has something to do with the state of the lineitems.


Still true in 2.7.1
Agree that it may be due to line item links to queues but may also be permissions? There are perms for deleting authority and bib import queue which work and no perm for deleting acq import queues. Just a thought.

Kathy Lussier (klussier) wrote :

This is puzzling. I'm still unable to replicate this bug on a 2.6 system (one of the 2.4 systems I used when originally testing this bug in March.).

However, I retested on another system running master (around 2.7.1) today, and I am able to replicate the problem. We can rule out permission issues because I was using a superuser account. The lineitem states were pending, which was also the case on the system where I had a successful test.

I see the following in the logs:

Marking bug as confirmed.

Changed in evergreen:
status: New → Confirmed
Mike Rylander (mrylander) wrote :

Kathy's logs gave me the clue I needed. The ACQ audit tables were originally built with constraints (and defaults) included. That's incorrect, though, and the constraints are restricting the delete of the queued records, which in turn restrict the delete of the queue. This only affects ACQ-used queues.

We'll need an upgrade script that drops all the constraints and defaults from those ACQ audit tables. I don't have the tuits today, but at least the path is clear, now.

Mike Rylander (mrylander) wrote :

The ultimate cause was a little more nuanced than my above comment suggests -- the foreign key that was causing the problem was actually part of an update, not part of the original table creation -- but find below a branch that removes the offending constraint. From the commit message:

The ACQ lineitem audit table was augmented with an fkey pointing to the queued record that was related to the line item. That's bad because there are also triggers which attempt to manage that table. Hilarity ensues. We should not have an fkey on an audit table, so, we now remove that.

In order to test this, first attempt to delete an ACQ queue and have that fail. Apply the DB change, attempt again, and have it succeed.;a=shortlog;h=refs/heads/user/miker/lp1289486-acq-audit-tables-block-queue-delete

tags: added: pullrequest
Changed in evergreen:
milestone: none →
Angela Kilsdonk (akilsdonk) wrote :

I tested Mike's patch and I was able to successfully delete acq queues!

tags: added: signedoff
Dan Wells (dbw2) on 2015-06-10
Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Dan Wells (dbw2) wrote :

We had a DB with this issue, and Mike's patch did just what it claimed. Pushed to master through 2.7. Thanks, all!

Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
milestone: → 2.9-alpha
status: Confirmed → Fix Committed
Changed in evergreen:
milestone: 2.9-alpha → 2.9-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers