Add ability to delete bundles in file administration - #5307
alijaber-atmire wants to merge 15 commits into
Conversation
… 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
|
Hi @alijaber-atmire, |
|
Hi @alijaber-atmire, |
…to-delete-bundles-in-file-administration_contribute-main
|
Confirmed working locally at dataquest, works as described, with a few bug findings:
Since this PR adds a new method to the REST API, the REST Contract should also be updated: https://github.com/DSpace/RestContract |
Preserve staged updates across bundle refreshes, prevent removal actions from submitting forms, and cover the equivalent 7.6 visual states.
Revert the main-only implementation so shared fixes can enter through the 7.6 branch history first.
Bring the shared state-preservation and non-submitting action fixes into main through the 7.6 branch history.
Reapply the table-specific danger styling, centered actions, and stable drag-handle layout that cannot be merged from the older 7.6 component structure.
|
Hello @Kasinhou , thank you for testing and reporting these issues. Both UI regressions have been addressed:
I also created the requested REST Contract update: DSpace/RestContract#384. |
|
Hello @alijaber-atmire, thanks for the fixes. |
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
BundleDataServiceand cache invalidation so the list refreshes after deletes.Instructions for Reviewers
List of changes in this PR:
ItemBitstreamsService.removeMarkedBundlesAndBitstreamsissues bulk bundle removal (JSON Patchremoveoperations on/bundles/{id}viaBundleDataService.removeMultiple) alongside existing bitstream deletions; success/error notifications distinguish bundles-only, bitstreams-only, or both.BundleDataService.removeMultiplesends the patch to the bundles collection endpoint; item bitstreams page usesBundleDataService.findAllByItemfor bundle lists and invalidates the item’s bundles link after successful saves.How to test / review
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.