Skip to content

MCR-3886 skip already deleted children in CLI delete commands - #3189

Open
Mewel wants to merge 1 commit into
mainfrom
issues/MCR-3886-cli-delete-existing-object
Open

Mewel wants to merge 1 commit into
mainfrom
issues/MCR-3886-cli-delete-existing-object

Conversation

@Mewel

@Mewel Mewel commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Link to jira.

"delete all objects of type" and "delete object from .. to .." generate the delete commands up front. Children that were already deleted with their parent are now skipped instead of failing (OCFL) or firing a DELETE event for an empty object (ifs2).

  • add command "delete existing object {0}" that skips non-existing objects and use it in all commands that generate delete commands
  • "delete object {0}" is unchanged and still removes leftovers of objects without metadata
  • add tests

Pull Request Checklist (Author)

Please go through the following checklist before assigning the PR for review:

Ticket & Documentation

  • The issue in the ticket is clearly described and the solution is documented.
  • Design decisions (if any) are explained.
  • The ticket references the correct source and target branches.
  • The fixed-version is correctly set in the ticket and matches the PR's target branch (main).

Feature & Improvement Specific Checks

  • Instructions on how to test or use the feature are included or linked (e.g. to documentation).
  • For UI changes: before & after screenshots are attached.
  • New features or migrations are documented.
  • Does this change affect existing applications, data, or configurations?
    • Yes: Is a migration required? If yes, describe it.
    • Breaking change is marked in the commit message.

Bugfix-Specific Checks

  • Affected version is listed in the ticket.
  • Minimal code changes were made (no refactoring).
  • This PR truly fixes only the reported bug.
  • No breaking changes are introduced.
  • A relevant test was added (if feasible).

Testing

  • I have tested the changes locally.
  • The feature behaves as described in the ticket.
  • Were existing tests modified?
    • Yes: explain the changes for reviewers.

MCR Conventions & Metadata

  • MCR naming conventions are followed
  • If the public API has changed:
    • Old API is deprecated or a migration is documented.
    • If not, no action needed.
  • Java license headers are added where necessary.
  • Javadoc is written for non-self-explanatory classes/methods (Clean Code).
  • All configuration options are documented in Javadoc and mycore.properties.
  • No default properties are hardcoded — all set via mycore.properties.

Multi-Repo Considerations

  • Is an equivalent PR in MIR required?
    • If yes, is it already created?

"delete all objects of type" and "delete object from .. to .." generate
the delete commands up front. Children that were already deleted with
their parent are now skipped instead of failing (OCFL) or firing a
DELETE event for an empty object (ifs2).

- add command "delete existing object {0}" that skips non-existing
  objects and use it in all commands that generate delete commands
- "delete object {0}" is unchanged and still removes leftovers of objects
  without metadata
- add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant