Hi all,
I didn't see this in the documentation or see a topic for this, but if I missed it, please let me know.
Is there a way, CLI or otherwise, to mass delete physical locations? I had created physical locations not realizing they weren’t hierarchical and so am now stuck with a bunch of unrelated objects in “File 1”, for example, even though they’re in different boxes. I want to delete them and use a flat system for storage (ie “A1500, File 4” is one entry rather than “A1500” and “File 4” being two separate entries). However, there are way too many entries to delete manually, one by one. Is there a way to mass delete these both from descriptions and from the physical storage section itself?
Thanks,
Jarad
--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/16dc0df5-dc65-43bb-a96f-492d1cfb65f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Jarad
Yes - you are correct - you could use the csv import --update="match-and-update" to re-add these locations once the physical locations have been deleted. Make sure you make backups first, and use the “Skip unmatched” option, to avoid any potential errors!
I have created a script that will delete every physical storage location from an AtoM instance when run from the AtoM root folder using the "php symfony tools:run" CLI task.
It is UNTESTED - you should definitely back up your data and proceed at your own risk
I would strongly recommend testing this in a different AtoM instance than your production one beforehand!
The script can be found here: https://gist.github.com/sbreker/31a979b5b615237d6e216b106e253d27
Steps required to run it:
Save this script on AtoM server.
Run from AtoM root folder: php symfony tools:run <full_path_to_this_file>
The script will print the physical location name, location and type for each deleted location as it runs.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/f3f65aff-46b3-4277-ac28-2e4201fa4492n%40googlegroups.com.