[OPEN-ILS-GENERAL] Moving/Renaming Volumes - was Deleting parts map for deleted copies
Josh Stompro
stomproj at exchange.larl.org
Tue Jul 26 16:42:27 EDT 2016
Just to reply to myself, I found the asset.merge_record_assets database function which seems to cover all the bases, looking through that helped me confirm that what I'm doing will work.
http://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/sql/Pg/999.functions.global.sql;hb=HEAD#l964
Josh Stompro - LARL IT Director
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Josh Stompro
Sent: Monday, July 25, 2016 3:37 PM
To: Evergreen Discussion Group
Subject: Re: [OPEN-ILS-GENERAL] Moving/Renaming Volumes - was Deleting parts map for deleted copies
Blake or anyone else,
I've finished cleaning up the parts and that went well. Now I'm looking at a list of ~300 volumes (asset.call_number) that have been added with the wrong label. And some of them have several variations of the wrong label for the same record and owning lib, so I cannot just rename them all, I need to transfer some copy's to different volumes after the first occurrence has been renamed. There are enough of them that I don't want to use the staff client since that means looking up 300 volumes.
Are there any gotchas to moving copies to different volumes on the same record? I don't think I need to worry about parts since I'm not moving to a different bib record with this fixup.
Would something like this cover it?
Volume_id is the current call_number.id and existing_volume is the volume on the same record to move to.
UPDATE asset.copy SET call_number = existing_volume WHERE call_number = volume_id and deleted=false;
UPDATE action.hold_request SET target=existing_volume WHERE target = volume_id and hold_type = 'V';
UPDATE action.aged_hold_request SET target=existing_volume WHERE target = volume_id and hold_type = 'V';
UPDATE asset.call_number set deleted=true where id = volume_id;
I don't see any asset.uri_call_number_map entries to worry about. Or any asset.call_number_note entries. I've looked through the asset.volume.batch.transfer method and Cat/Merge.pm , and I don't see anything else that seems to apply.
Thanks
Josh Stompro - LARL IT Director
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Blake Henderson
Sent: Thursday, July 21, 2016 2:28 PM
To: open-ils-general at list.georgialibraries.org<mailto:open-ils-general at list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Deleting parts map for deleted copies
Josh,
Watch out for 'P' level holds targeting your monograph_part ID's
-Blake-
Conducting Magic
MOBIUS
573-234-4513
877-312-3517
On 7/21/2016 1:37 PM, Josh Stompro wrote:
Hello, I'm working on a parts cleanup project(EG 2.8), and I'm wondering if there are any problems with deleting entries from asset.copy_part_map for all deleted copies? I want to purge all the parts that are not being used before I start making fixes. Once I remove the part_map I can remove the biblio.monographic_parts that are not currently used by any copies or holds. Are there any pitfalls that you know about?
Thanks
Josh
Lake Agassiz Regional Library - Moorhead MN larl.org
Josh Stompro | Office 218.233.3757 EXT-139
LARL IT Director | Cell 218.790.2110
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20160726/4ec5fe14/attachment-0001.html>
More information about the Open-ils-general
mailing list