Skip to content

Delete pending json patch operations#1251

Merged
tdonohue merged 1 commit intoDSpace:mainfrom
4Science:1217
Jun 30, 2021
Merged

Delete pending json patch operations#1251
tdonohue merged 1 commit intoDSpace:mainfrom
4Science:1217

Conversation

@alemarte
Copy link
Copy Markdown
Contributor

References

Description

When the user leaves the submission page the state related to the aborted submission must be totally erased.

Instructions for Reviewers

To achieve the goal a new NgRx Action has been added (DELETE_PENDING_JSON_PATCH_OPERATIONS). This action is dispatched on the OnDestroy hook of the SubmissionEditComponent. The reducer destroy every data related to the aborted submission.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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 TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies
  • 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, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@tdonohue tdonohue added 1 APPROVAL pull request only requires a single approval to merge bug component: submission medium priority labels Jun 24, 2021
@tdonohue tdonohue added this to the 7.0 milestone Jun 24, 2021
@tdonohue tdonohue self-requested a review June 24, 2021 19:02
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 @alemarte ! I've tested this today... I was able to verify the bug from the ticket using the demo site, and verify also that this PR fixes that issue. The code looks good and it comes with tests to prove it's working as expected. Thanks!

@tdonohue tdonohue merged commit a14230a into DSpace:main Jun 30, 2021
4science-it pushed a commit to 4Science/dspace-angular that referenced this pull request Jan 26, 2024
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: submission medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pending json patch operations should be canceled when leaving the submission page

2 participants