Merging Bib Records Deletes Bookbag entries

Bug #1731960 reported by Rogan Hamby
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.0
Fix Released
Medium
Unassigned

Bug Description

The asset.merge_record_assets removes bib records from containers when merging and deleting the record as appropriate but bib containers with the btype of 'bookbag' (used as reading lists) should instead be updated to the new bib record.

Tags: pullrequest
Changed in evergreen:
assignee: nobody → Rogan Hamby (rogan-hamby)
Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

patch: eded258f532dc9d24d4604f7eedfd33a27e8f00a
user/rogan/lp1731960_replace_bookbags_in_merge

Patch includes the sql and a pgtap test. I considered checking for the record already existing and not replacing it but on reading related lp1485695 I realized that some people may want that number of occurrences so with it not clear what the desired behavior would be this will allow duplicates.

tags: added: pullrequest
Revision history for this message
Cesar V (cesardv) wrote :
Kathy Lussier (klussier)
Changed in evergreen:
assignee: Rogan Hamby (rogan-hamby) → Kathy Lussier (klussier)
Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

Upgrade script at the tip of user/rogan/lp1731960_replace_bookbags_in_merge

Kathy Lussier (klussier)
Changed in evergreen:
milestone: none → 3.1-rc
Revision history for this message
Kathy Lussier (klussier) wrote :

I tested this code using the signoff branch Cesar posted. I added a book to a list and then try to merge it with another record. The other record was the lead record.

The bib merge didn't succeed. Typically, the screen refreshes after the merge and brings me to the record page for the lead record.

With the patch loaded, I remain in the bucket interface, where the two records are still listed. I see the following in the browser console:

error calling method open-ils.cat.biblio.records.merge : 500 : *** Call to [open-ils.cat.biblio.records.merge] failed for session [0.383924049703027851521744377612], thread trace [0]:
Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.18.2/OpenILS/Application/Cat.pm line 945.

Changed in evergreen:
assignee: Kathy Lussier (klussier) → nobody
Revision history for this message
Kathy Lussier (klussier) wrote :

Actually, it looks like the real issue is that the merge_record_assets function isn't being created with that branch.

Revision history for this message
Kathy Lussier (klussier) wrote :

Gah! Never mind. I found the problem. Taking another look now.

Revision history for this message
Kathy Lussier (klussier) wrote :

Sorry for the earlier noise. I had forgotten that I resolved an earlier merge conflict. I apparently had left one of the conflict markers in the file, which made Evergreen unhappy. Once I properly resolved the conflict, this code worked as described. The pgtap test also passed with flying colors.

Merged to master and release 3.0. Thank you Rogan and Cesar!

Changed in evergreen:
status: New → 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.

Other bug subscribers

Remote bug watches

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