UoE/fix(bitstreams): offer CC-LICENSE when adding a bitstream (#888) - #35
Merged
milanmajchrak merged 1 commit intoAug 10, 2026
Conversation
The bundle suggestion list on the "Upload bitstream" page is built from the item's existing bundles plus a fixed set of standard ones, which listed only ORIGINAL, THUMBNAIL and LICENSE. CC-LICENSE was therefore not offered, which is why curators reported being able to add a licence and a depositor agreement to an item by hand but not a CC licence. Add CC-LICENSE to that list. The control is a free-text typeahead, so the bundle was always typeable; this only makes it discoverable. Nothing else consumes the list beyond that page, and it only ever feeds suggestions - it never creates a bundle - so item pages are unaffected. The DataShare theme already renders CC-LICENSE and the IIIF viewer already excludes it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds CC-LICENSE to upload bundle suggestions, making Creative Commons licences discoverable when adding bitstreams.
Changes:
- Updates default and example bundle configuration.
- Adds configuration and component-level regression tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/config/default-app-config.ts |
Adds the CC-LICENSE default suggestion. |
src/config/default-app-config.spec.ts |
Tests the shipped bundle defaults. |
src/app/item-page/bitstreams/upload/upload-bitstream.component.spec.ts |
Verifies the suggestion with empty and populated bundle lists. |
config/config.example.yml |
Documents the updated default list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
milanmajchrak
merged commit Aug 10, 2026
ba52cb6
into
datashare-UoEMainLibrary-dspace-8_x
9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the UI half of dataquest-dev/dspace-customers#888. Companion to dataquest-dev/uoe-dspace-datashare-backend#45.
What was wrong
Curators reported being able to add a licence and a depositor agreement to an item by hand, but not a CC licence — "there's no option to add a CC-License bundle". It was reported twice, by two people, and never diagnosed in the original thread.
The cause is one line. The bundle suggestion list on the Upload bitstream page is the item's existing bundles plus a fixed set of standard ones, and that set was:
CC-LICENSEsimply was not in it.What this does
Adds
CC-LICENSEto that list, insrc/config/default-app-config.tswithconfig/config.example.ymlkept in sync.The control is a free-text typeahead with a "New bundle" button, so the bundle was always typeable — this only makes it discoverable.
config/config.ymlis deliberately not touched:mergeConfigreplaces arrays wholesale, so the shipped default alone already produces the wanted list, and putting a UoE-only diff on an otherwise-stock upstream file would both permanently shadow future upstream additions and guarantee a conflict on every sync.Blast radius
standardBundleshas exactly two consumers repo-wide, both inupload-bitstream.component.tsngOnInit, and it only ever feeds suggestions — it never creates a bundle. Item pages render bundles fetched from REST, so they are unaffected. The DataShare theme already rendersCC-LICENSEand the IIIF viewer already excludes it.Verified
Karma suite green (5485), eslint clean.
Cypress against a live full stack (this UI, the DataShare theme, a real backend, an item created by the batch importer): the dropdown renders ORIGINAL / THUMBNAIL / LICENSE / CC-LICENSE.
Note
Adding a CC licence by hand through this dropdown produces a different shape from the one the importer and the web submission produce — the bitstream is named after the uploaded file, with a guessed format and no source, rather than
license_text/License/org.dspace.license.CreativeCommons. And if the item already has a CC-LICENSE bundle, the upload adds a second bitstream to it, which the DataShare theme will not display. Worth knowing before this is used as a repair route for existing items; the proper fix for those is a repair script.🤖 Generated with Claude Code