Skip to content

Conversation

@FrancescoMolinaro
Copy link
Contributor

@FrancescoMolinaro FrancescoMolinaro commented Nov 14, 2025

References

Related to DSpace/RestContract#318
Related to DSpace/DSpace#11549

##Description

This PR migrates the custom URL feature from DSpace-CRIS to core DSpace, allowing to define a custom url of item in submission.

##Instructions for Reviewers

The custom URL feature allows items to have human-friendly URLs instead of UUID-based paths.
To test it a rest config for the newly introduced section must be in place.

ref: DSpace/DSpace#11549 (comment)

Once the section is configured the user can provide a value for the custom url in submission.
After the item has been deposited it will be possible to access it via the custom url, e.g. /entities/person/customUrlValue

List of changes in this PR:

Adapted item resolver.
New submission section for custom url.

Additional change:

Fixed sync-i18n script (broken after latest updates on main)
Executed sync on labels.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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.

@FrancescoMolinaro FrancescoMolinaro marked this pull request as draft November 14, 2025 16:37
@FrancescoMolinaro FrancescoMolinaro changed the title Task/main/duracom 413 Implement custom url functionality Nov 14, 2025
@FrancescoMolinaro FrancescoMolinaro changed the title Implement custom url functionality MERGER: porting creation of a custom URL for Items Nov 19, 2025
@FrancescoMolinaro FrancescoMolinaro marked this pull request as ready for review November 19, 2025 15:51
@github-actions
Copy link

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@tdonohue tdonohue added DSpace-CRIS merger This ticket/PR relates to the merger of DSpace-CRIS into DSpace. new feature labels Dec 1, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Dec 1, 2025
@tdonohue tdonohue requested a review from kskaiser December 4, 2025 17:48
@github-actions
Copy link

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-project-automation github-project-automation bot moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Dec 17, 2025
@tdonohue tdonohue changed the title MERGER: porting creation of a custom URL for Items [DSpace-CRIS] Creation of a custom URL for Items Jan 13, 2026
"error.validation.license.notgranted": "Um die Veröffentlichung abzuschließen, müssen Sie die Lizenzbedingungen akzeptieren. Wenn Sie zur Zeit dazu nicht in der Lage sind, können Sie Ihre Arbeit sichern und später dazu zurückkehren, um zuzustimmen oder die Einreichung zu löschen.",
// "error.validation.license.required": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.",
// TODO New key - Add a translation
"error.validation.license.required": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.",
Copy link
Member

Choose a reason for hiding this comment

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

The old translation from error.validation.license.notgranted does also work for the new key error.validation.license.required:

  "error.validation.license.required": "Um die Veröffentlichung abzuschließen, müssen Sie die Lizenzbedingungen akzeptieren. Wenn Sie zur Zeit dazu nicht in der Lage sind, können Sie Ihre Arbeit sichern und später dazu zurückkehren, um zuzustimmen oder die Einreichung zu löschen.",


// "error.validation.custom-url.conflict": "The custom url has been already used, please try with a new one.",
// TODO New key - Add a translation
"error.validation.custom-url.conflict": "The custom url has been already used, please try with a new one.",
Copy link
Member

Choose a reason for hiding this comment

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

"error.validation.custom-url.conflict": "Die sprechende URL wird bereits andersweitig genutzt. Bitte versuchen Sie es mit einer anderen URL."


// "error.validation.custom-url.empty": "The custom url is required and cannot be empty.",
// TODO New key - Add a translation
"error.validation.custom-url.empty": "The custom url is required and cannot be empty.",
Copy link
Member

Choose a reason for hiding this comment

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

"error.validation.custom-url.empty": "Die sprechende URL ist erforderlich und darf nicht leer sein."


// "error.validation.custom-url.invalid-characters": "The custom url contains invalid characters.",
// TODO New key - Add a translation
"error.validation.custom-url.invalid-characters": "The custom url contains invalid characters.",
Copy link
Member

Choose a reason for hiding this comment

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

"error.validation.custom-url.invalid-characters": "Die sprechende URL enthält ungültige Zeichen.",


// "submission.sections.submit.progressbar.CustomUrlStep": "Custom Url",
// TODO New key - Add a translation
"submission.sections.submit.progressbar.CustomUrlStep": "Custom Url",
Copy link
Member

Choose a reason for hiding this comment

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

"submission.sections.progressbar.CustomUrlStep": "Sprechende URL",


// "submission.sections.custom-url.alert.info": "Define here a custom URL which will be used to reach the item instead of using an internal randomly generated UUID identifier. ",
// TODO New key - Add a translation
"submission.sections.custom-url.alert.info": "Define here a custom URL which will be used to reach the item instead of using an internal randomly generated UUID identifier. ",
Copy link
Member

Choose a reason for hiding this comment

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

"submission.sections.custom-url.alert.info": "Legen Sie hier eine sprechende URL fest, über die das Item anstelle eines zufällig generierten internen UUID Identifiers erreichbar ist. ",


// "submission.sections.custom-url.url.placeholder": "Custom URL",
// TODO New key - Add a translation
"submission.sections.custom-url.url.placeholder": "Custom URL",
Copy link
Member

Choose a reason for hiding this comment

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

"submission.sections.custom-url.url.placeholder": "Sprechende URL",


// "item.preview.organization.url": "URL",
// TODO New key - Add a translation
"item.preview.organization.url": "URL",
Copy link
Member

Choose a reason for hiding this comment

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

correct


// "item.preview.organization.address.addressLocality": "City",
// TODO New key - Add a translation
"item.preview.organization.address.addressLocality": "City",
Copy link
Member

Choose a reason for hiding this comment

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

"item.preview.organization.address.addressLocality": "Stadt",


// "item.preview.organization.alternateName": "Alternative name",
// TODO New key - Add a translation
"item.preview.organization.alternateName": "Alternative name",
Copy link
Member

Choose a reason for hiding this comment

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

"item.preview.organization.alternateName": "Alternativer Name",

@saschaszott
Copy link
Contributor

saschaszott commented Jan 16, 2026

We have found several places in the Angular code that cannot handle the case where a custom URL is used in the URL instead of an item’s UUID. For example, when a custom URL exists, no bundle can be created (in the file administration of the item).

The corresponding component assumes that a UUID is present in the URL:

https://github.com/4Science/dspace-angular/blob/1055dc74f90baeb8855bef62f1828d2de280f3c4/src/app/item-page/bitstreams/upload/upload-bitstream.component.ts#L153

There was also a bug in DSpace CRIS 7 and 8 when accessing the item administration if a custom URL existed (4Science#124). This bug was fixed in the latest DSpace CRIS 8 release.

Before merging this PR, the frontend should be systematically tested with items that have a custom URL.

@saschaszott
Copy link
Contributor

saschaszott commented Jan 16, 2026

A code search for .params.id yields more than 50 results. These occurrences could potentially cause issues with custom URLs in cases where the invocation relies on the id parameter of the route.

@FrancescoMolinaro
Copy link
Contributor Author

Hi @saschaszott , thanks for the feedback, I have pushed some changes to the item page resolver so to enforce the uuid in case of an administrative view (also bitstreams upload).

In this way we should keep all the older behaviours and mechanisms active; I have also checked the other occurencies of "params.id" and they would seem covered by the change to the item data service or not affected by the custom url (e.g. access control, workspace, etc.)

If this would be approved I will propagate the change aslo on the CRIS codebase.

I wanted also to inform that this feature is used on CRIS only on Person items and that is most likely the reason why certain aspect weren't considered, nevertheless I agree that the introduction of the feature shouldn't compromise existing behaviours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DSpace-CRIS merger This ticket/PR relates to the merger of DSpace-CRIS into DSpace. high priority new feature

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

5 participants