Skip to content

#2923 - Fixed redirect on new Item version creation#3069

Merged
tdonohue merged 3 commits intoDSpace:mainfrom
4Science:task/main/DURACOM-263
May 22, 2024
Merged

#2923 - Fixed redirect on new Item version creation#3069
tdonohue merged 3 commits intoDSpace:mainfrom
4Science:task/main/DURACOM-263

Conversation

@Simone-Ramundi
Copy link
Copy Markdown
Contributor

References

Description

Fixed user redirect after creating a new version of an item. Replaced the old method this.getIDHref() with this.searchData.getSearchByHref().

Instructions for Reviewers

List of changes in this PR:

  • Implemented new solution inside method findByItem();
  • Changed tests.

To Test:

  • Connect as administrator;
  • Find and open an item in the repository;
  • Click on the new version button in the upper left of the page;
  • Add text to describe the version and then click on Create;
  • Want a few seconds, a confirmation message appears: New version has been created with version number 2;
  • The new version submission form is displayed.

Checklist

  • 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 yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn 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.
  • 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.

@tdonohue tdonohue added bug component: versioning 1 APPROVAL pull request only requires a single approval to merge labels May 22, 2024
@tdonohue tdonohue self-requested a review May 22, 2024 13:46
@tdonohue tdonohue added this to the 8.0 milestone May 22, 2024
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @Simone-Ramundi ! I've tested this today and verified this fixes the bug. Versioning is now redirecting properly to the submission form

@tdonohue tdonohue merged commit 659052f into DSpace:main May 22, 2024
@pilasou
Copy link
Copy Markdown
Contributor

pilasou commented May 23, 2024

Hi @Simone-Ramundi , I have tested the fix and thought it worked for a standard Item (I am redirected to the form for the new version), when trying to create a new version of an item with relations, I get an error message (for reference: I used a standard Item part the dataset provided by DSpace: http://localhost:4000/entities/publication/1974d7d3-9648-4dbe-b083-56374f5314e4):

Error from chrome dev tool:
image

DSpace backend log error:
pr3069-backendlog-error.txt

@tdonohue
Copy link
Copy Markdown
Member

tdonohue commented May 23, 2024

@pilasou and @Simone-Ramundi : I was able to reproduce @pilasou 's issue as well. After further investigation, I believe the bug that @pilasou has found is directly related to my open PR DSpace/DSpace#9509. I think it should be fixed by that PR, but I'm going to test it further today.

So, I'm going to turn PR's report into a new issue ticket and claim it for myself. I think I should be able to fix it in DSpace/DSpace#9509.

In summary, I think this PR from @Simone-Ramundi was successful in fixing the frontend bug. However, the frontend fix allowed @pilasou to discover a backend bug that should be fixable in DSpace/DSpace#9509.

Thanks @pilasou for your additional testing here!

UPDATE: Moved the new bug to #3072

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

Labels

1 APPROVAL pull request only requires a single approval to merge bug component: versioning

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

The Item version input form is not displayed in DSPace 8, preventing the creation of a new version of an item.

3 participants