Skip to content

UoE/fix(bitstreams): offer CC-LICENSE when adding a bitstream (#888) - #35

Merged
milanmajchrak merged 1 commit into
datashare-UoEMainLibrary-dspace-8_xfrom
uoe/888-cc-license-bundle-ui
Aug 10, 2026
Merged

UoE/fix(bitstreams): offer CC-LICENSE when adding a bitstream (#888)#35
milanmajchrak merged 1 commit into
datashare-UoEMainLibrary-dspace-8_xfrom
uoe/888-cc-license-bundle-ui

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

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:

standardBundles: ['ORIGINAL', 'THUMBNAIL', 'LICENSE'],

CC-LICENSE simply was not in it.

What this does

Adds CC-LICENSE to that list, in src/config/default-app-config.ts with config/config.example.yml kept 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.yml is deliberately not touched: mergeConfig replaces 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

standardBundles has exactly two consumers repo-wide, both in upload-bitstream.component.ts ngOnInit, 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 renders CC-LICENSE and 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

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
milanmajchrak merged commit ba52cb6 into datashare-UoEMainLibrary-dspace-8_x Aug 10, 2026
9 checks passed
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.

2 participants