Skip to content

Add ability to delete bundles in file administration#5307

Open
alijaber-atmire wants to merge 26 commits intoDSpace:mainfrom
atmire:w2p-138875_ability-to-delete-bundles-in-file-administration_contribute-main
Open

Add ability to delete bundles in file administration#5307
alijaber-atmire wants to merge 26 commits intoDSpace:mainfrom
atmire:w2p-138875_ability-to-delete-bundles-in-file-administration_contribute-main

Conversation

@alijaber-atmire
Copy link

@alijaber-atmire alijaber-atmire commented Mar 24, 2026

References

Description

Adds bundle-level delete on the item Edit bitstreams page: curators can mark a whole bundle for removal, undo before save, and submit so the UI removes bundles (and their bitstreams) through the REST API. Bundle loading and submit flow are aligned with BundleDataService and cache invalidation so the list refreshes after deletes.

Instructions for Reviewers

List of changes in this PR:

  • Item bitstreams edit: per-bundle actions to mark a bundle for removal, show a clear “will be deleted” state, disable drag/upload for that bundle, and undo removal before save.
  • Submit flow: ItemBitstreamsService.removeMarkedBundlesAndBitstreams issues bulk bundle removal (JSON Patch remove operations on /bundles/{id} via BundleDataService.removeMultiple) alongside existing bitstream deletions; success/error notifications distinguish bundles-only, bitstreams-only, or both.
  • Data layer: BundleDataService.removeMultiple sends the patch to the bundles collection endpoint; item bitstreams page uses BundleDataService.findAllByItem for bundle lists and invalidates the item’s bundles link after successful saves.

How to test / review

  1. Deploy this UI against a REST build that includes DSpace#12150.
  2. As a user with permission to edit item bitstreams, open an item → EditBitstreams (file administration).
  3. Use Remove bundle on a non-essential bundle; confirm the row shows the removal warning and upload/drag are disabled.
  4. Use Undo and confirm the bundle returns to normal.
  5. Mark one or more bundles for removal (and optionally remove individual bitstreams in other bundles), click Save; confirm success notification, bundles disappear, and removed bitstreams are gone after refresh.
  6. Regression: reorder bitstreams (drag), upload to a bundle, and delete single bitstreams still behave as before.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

AAwouters and others added 26 commits June 12, 2024 11:44
 - Introduced 'setFields' method
 - Applied more consistency in using fields vs parameters in methods
 - Split up methods related to iiif
Splitting the creation of the form into multiple methods that do one
specific thing (e.g. updating the form model, creating the form group,
prefilling data in the form, ...) allows for easier theming of the form
itself.
Without this fix the form showed old data when immediately going back
to the edit page after changing the primary bitstream or format.
Moved the creation of the update observables to their own methods and
unified the handling of their results in a single subscription
…age-refactor-9.0

# Conflicts:
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts
#	src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
… fixes

Replaced remaining ItemService#getBundles usages with BundleService#findAllByItem because the first one didn't use caching
…bute-7.6' into w2p-138875_ability-to-delete-bundles-in-file-administration-ANGULAR-main
# Conflicts:
#	src/app/core/data/item-data.service.ts
#	src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html
@alexandrevryghem alexandrevryghem changed the title W2p 138875 ability to delete bundles in file administration contribute main Add ability to delete bundles in file administration Mar 24, 2026
@alexandrevryghem alexandrevryghem added component: administrative tools Related to the admin menu or tools component: Item (Archived) Item display or editing labels Mar 24, 2026
@alijaber-atmire alijaber-atmire marked this pull request as ready for review March 25, 2026 02:45
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 11.0 Release Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: administrative tools Related to the admin menu or tools component: Item (Archived) Item display or editing new feature

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Add ability to delete bundles in file administration

6 participants