Hi Tiffany, One way to cover your bases is to use the API method open-ils.cat.asset.copy.fleshed.batch.update or open-ils.cat.asset.copy.fleshed.batch.update.override to do the deletion. Given a list of item IDs, following the example of $scope.deleteCopiesFromCatalog in Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js would do it:
For each item in the list: 1. use open-ils.search.asset.copy.fleshed2.retrieve to retrieve an acp fieldmapper object for the item 2. set the fieldmapper objects ischanged and isdeleted fields 3. stash it in an array 4. (optionally) iterate and let the array grow up to (say) 50 items 5. use open-ils.cat.asset.copy.fleshed.batch.update.override to request the deletion of the array of items Doing it that way will get you the propagation of deleting call numbers and bibs left empty by deleting the items. Regards, Galen On Wed, Dec 11, 2024 at 2:13 PM Tiffany Little via Evergreen-dev < [email protected]> wrote: > Good afternoon, > > I was working on a script, and then realized maybe I didn't need to > reinvent the wheel on this. Does anyone have a script or process that they > use for mass deleting copies? > > We have a library with 35K Discard/Weed copies that need to be deleted. > Since the deletion needs to cascade to call number, bib, etc I wanted to > make sure I was covering all my bases. > > Thanks! > Tiffany > > > > [image: logo with link to Georgia Public Library Service website] > <https://georgialibraries.org/> > > Tiffany Little > > *PINES Bibliographic Projects Manager* > > ------------------------------ > > Georgia Public Library Service > > 2872 Woodcock Blvd, Suite 250 | Atlanta, GA 30341 > > (404) 235-7161 | [email protected] > > [image: logo with link to Georgia Public Library Service Facebook page] > <https://www.facebook.com/georgialibraries>[image: logo with link to > Georgia Public Library Service Instagram page] > <https://www.instagram.com/georgialibraries/>[image: logo with link to > Georgia Public Library Service LinkedIn page] > <https://www.linkedin.com/company/georgia-public-library-service/>[image: > logo with link to Georgia Public Library Service Threads page] > <https://www.threads.net/@georgialibraries> > > Join our email list <http://georgialibraries.org/subscription> for > stories of Georgia libraries making an impact in our communities. > _______________________________________________ > Evergreen-dev mailing list > [email protected] > http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev > -- Galen Charlton Implementation and IT Manager Equinox Open Library Initiative [email protected] https://www.equinoxOLI.org phone: 877-OPEN-ILS (673-6457) direct: 770-709-5581 <http://evergreen-ils.org>
_______________________________________________ Evergreen-dev mailing list [email protected] http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev
