Unable to Undelete a MARC record in MARC Edit screen

Bug #1845241 reported by Christine Morgan
98
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Evergreen
High
Unassigned
3.3
High
Unassigned
3.5
High
Unassigned

Bug Description

In MARC Edit, in either the full editor or the flat text editor, if you try to undelete a previously deleted MARC record by clicking on the "Undelete" button, the "Successfully updated record" confirmation appears in the lower right. The "undelete" button briefly displays as "Delete" then flips back to "Undelete." The confirmation then disappears and the record remains in a deleted state.

Observed in 3.2.8 and 3.3.3.

This was not an issue in 3.2.4.

May be related to Bug 1843599

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

We're seeing this on 3.3.3 also. Marking as Confirmed.

Changed in evergreen:
status: New → Confirmed
milestone: none → 3.4-beta2
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4-beta2 → 3.4.1
Changed in evergreen:
milestone: 3.4.1 → 3.4.2
Changed in evergreen:
milestone: 3.4.2 → 3.4.3
Revision history for this message
Elaine Hardy (ehardy) wrote :

Still seeing in 3.4.1

Revision history for this message
Andrea Neiman (aneiman) wrote :

I wonder if this is also related to bug 1768122

Lynn Floyd (lfloyd)
Changed in evergreen:
importance: Undecided → High
Revision history for this message
Jane Sandberg (sandbej) wrote :

It looks like the client is trying to use open-ils.cat.biblio.record.xml.update to undelete these records.

There's a specific OpenSRF API call we could use instead: open-ils.cat.biblio.record_entry.undelete; I'll try swapping that in and see if it works any better.

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbej) wrote :

Also, it seems like Deleting/Undeleting records isn't working too well with authority records either, but with different symptoms. I'll try to check that out too.

Jane Sandberg (sandbej)
Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbej) wrote :

Here's a branch that fixes this issue: user/sandbergja/lp1845241_undelete_marc_record_with_correct_api

This does not include a fix for bug 1768122, so please be careful of that while testing: a record might say that it is deleted in the OPAC view, but it might not actually be! Some surer ways to tell if something was undeleted properly:

* Whether the database column biblio.record_entry.active is true and biblio.record_entry.deleted is false (which you could check with a report, if you don't have database access).
* Whether you can retrieve the record in search results (keeping in mind that there is some search result caching going on, so you may have to try various different search terms).
* The button in the MARC editor says "Delete", not "Undelete".

Revision history for this message
Janet Schrader (jschrader) wrote :

I tested this today on Terran's sandbox for bug squashing week and can confirm that the "undelete" button does work and does undelete the record. I can search for the record by TCN, ISBN, author, and title and retrieve it. The red "Deleted" in the record summary does go away when the record is undeleted.

I am experiencing what's probably the caching issue in the bib record display. If I use a 'new' search term to find the record there is no indication it was previously deleted in either the record summary of bib display. In MARC edit the button is "Delete". But, if I refresh the bib record display the red warning that the record is deleted displays there. There is no red deleted in the record summary area.

Not sure if this indicates the fix is okay to sign off on.

Janet

Revision history for this message
Llewellyn Marshall (lbmarshallv) wrote :

The "undelete" button works, but when I go to add a new holding from the record, I receive this error in my browser's inspector:

vendor.bundle.js:6 Possibly unhandled rejection: error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.60931871495294491585149916315], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.26.1/OpenILS/Application/Cat.pm line 1226.

Revision history for this message
Janet Schrader (jschrader) wrote :

Sorry, I didn't follow through and try to add an item after I confirmed that the undelete worked.

I can confirm that the item is not created. The holdings tab doesn't close; the values in the item record are cleared; the working items line is cleared.

This is my error, the same as in comment #8.

core.bundle.js:1 error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.273196704199165641585156455386], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.26.1/OpenILS/Application/Cat.pm line 1226.

onmethoderror @ core.bundle.js:1
vendor.bundle.js:6 Possibly unhandled rejection: error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.273196704199165641585156455386], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.26.1/OpenILS/Application/Cat.pm line 1226.

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

I think the error with saving new items may be unrelated to the patch for this bug. Working on the bug squashing server https://terran-master.gapines.org/eg/staff/ I am unable to add new items to any record, whether or not it has been deleted/undeleted. I am seeing the same error in the console as above. Possibly an issue with the server?

Revision history for this message
Jane Sandberg (sandbej) wrote :

Note: this fix is loaded onto this server, which should be around until the end of April:

https://course.westus2.cloudapp.azure.com/eg/staff/

Login info available here: https://wiki.evergreen-ils.org/doku.php?id=qa:concerto_logins

Revision history for this message
Janet Schrader (jschrader) wrote :

I tested this tonight. I imported records that are TCNs 252, 253, 254. I created a template for BR1 and added items to 252 and 253. I then deleted TCN 254. The red deleted showed in the record summary area and, after refreshing the screen, the red "this record has been deleted..." showed in the bib display. I then opened the record in MARC edit and undeleted the record. The red deleted disappeared from the record summary and the button changed from 'delete' to 'undelete'. The "this record has been deleted" still showed in the bib display because I forgot to refresh the screen. I added an item but it didn't display. I cleared the cache, refreshed the screen, and this cleared the deleted warning and displayed the item.

Because I had skipped refreshing the screen after undeleting, I went through the steps again. I imported TCN 255. I deleted this record. The red deleted warnings appeared and the button changed from 'delete' to 'undelete'. I searched for the TCN 255 with no results. I found the record using search by DB ID. I undeleted the record. I cleared the cache and refreshed the screen. I was successful in adding an item.

This fix worked for me, just have to be aware of caching issues in EG.

Janet

Changed in evergreen:
milestone: 3.4.3 → 3.4.4
Revision history for this message
Blake GH (bmagic) wrote :
Michele Morgan (mmorgan)
tags: added: signedoff
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed all the way to rel_3_3. Thanks, Blake and Jane!

Revision history for this message
Galen Charlton (gmc) wrote :

I've opened bug 1888518 for the issue of authority delete/undelete not working in the AngularJS editor.

Changed in evergreen:
assignee: Galen Charlton (gmc) → nobody
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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers