In 6.4: After linking to a dataset, cannot unlink as 'Admin' and error message has code snippets and does not reference objects
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
With the Borealis upgrade to 6.4 in our test environment we found that as a regular 'Admin' after linking a dataset to Dataverse, you cannot unlink and an error appears that has code snippets and does not reference the objects properly.
*When does this issue occur?
After linking a data, an admin cannot unlink and instead gets an error that has code snippets and does not reference objects and requires translations
-
Which page(s) does it occurs on?
Dataset landing page of the dataset linking/ and unlinking -
What happens?
An error message appears with code snippets and does not reference the objects and is not human readable and also was not flagged in properties file for translation -
To whom does it occur (all users, curators, superusers)?
all depositors admins, those with permission to link and with 6.4 release I think this was an intended feature to be able to unlink (not just by SuperAdmins) -
What did you expect to happen?
That unlinking would be supported
Which version of Dataverse are you using?
6.4
Any related open or closed issues to this bug report?
some sortof related https://github.com/IQSS/dataverse/issues/10616
Screenshots:
Ideas for improvement as suggested by @JayanthyChengan
From the IQSS code, it appears that the exception encountered while unlinking (deleteLink) the dataset is appended to the property value “dataset.notlinked.msg”. The exception thrown from the Java code is in English and is not a human-readable error message.
msg = BundleUtil.getStringFromBundle("dataset.notlinked.msg") + ex;
The current property value is as follows:
dataset.notlinked.msg=There was a problem linking this dataset to yours:
Refer to the code snippet here:
DatasetPage.java, Line 3633
To improve user experience, we should consider reformatting the “dataset.notlinked.msg” property by removing exception message and adding details about the dataset links, making it more descriptive and human-readable.
There might be more cases of this type.
Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at DatasetPage.java line 3633 and review how the dataset.notlinked.msg property is combined with the unlink exception. Reproduce the unlink flow for an Admin on a linked dataset, then make the resulting message human-readable, reference the dataset links or objects appropriately, and remain suitable for translation. Verify the behavior on the dataset landing page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100