Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Command line tool for purging taxonomy #1620

Open
mcantelon opened this issue Jun 25, 2023 · 2 comments · May be fixed by #1621
Open

Feature: Command line tool for purging taxonomy #1620

mcantelon opened this issue Jun 25, 2023 · 2 comments · May be fixed by #1621
Labels
Type: enhancement An improvement to existing functionality.

Comments

@mcantelon
Copy link
Member

mcantelon commented Jun 25, 2023

Occasionally there's a need to purge taxonomies during migration testing, etc. A "taxonomy:purge" task would save time (given the alternative is writing a script to do it).

@mcantelon mcantelon added the Type: enhancement An improvement to existing functionality. label Jun 25, 2023
@anvit anvit linked a pull request Jun 26, 2023 that will close this issue
@anvit anvit added this to the 2.8.0 milestone Jun 26, 2023
@fiver-watson
Copy link
Contributor

Useful idea! Some thoughts:

  • Some taxonomies should definitely be locked from this task, i.e. hidden ones like publication status; possibly others
  • Some, if you allow them to be deleted at all, should probably require a --force option, since they could dramatically affect other related records. For example, deleting the container types from one of the physical storage taxonomies - if done in error, that would be reaaaaaaallly annoying to fix later! Similarly, many taxonomies are tied to controlled values taken directly from standards. At minimum there should be a BIG RED WARNING and y/n to continue for most cases
  • It would be really helpful to have some sort of option to either preserve or re-populate any default terms from the fixtures. Possibly both! I say both because:
    • We already have a problem with fixture terms and translations in upgraded users - they just never get the translations. Deleting all terms and then repopulating would solve that issue! However...
    • Deleting all terms and then repopulating means deleting all existing relations. So some option to delete everything EXCEPT AtoM's default terms for a given taxonomy (or delete/replace but keep relations) could help users clean up a bunch of local custom terms they don't want without potentially wiping AtoM's defaults

@fiver-watson fiver-watson linked a pull request Jun 28, 2023 that will close this issue
@mcantelon
Copy link
Member Author

Thanks @fiver-watson... good ideas! The preserve functionality definitely makes sense... I'll look into adding that.
I've currently got it so it won't purge "locked" taxonomies but the option to do this, confirming with --force or manual confirmation, would be good to have if I add the preserve functionality.

@anvit anvit removed this from the 2.8.0 milestone Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement An improvement to existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants