Administer workflow actions #2227
Merged
tdonohue merged 5 commits intoDSpace:mainfrom May 17, 2023
Merged
Conversation
tdonohue
approved these changes
May 17, 2023
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @alisaismailati ! I verified this fixes the bug and that WorkspaceItems can also now be deleted from the Administer Workflow section.
This was referenced May 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
To fix the problem to delete or send back a workflow item, changed the operator from forkJoin to combineLatest, when one of the actions is performed. To delete a workspace item, a new component to perform the delete action is added.
Instructions for Reviewers
To delete or send back a workflow item from the Administer workflow (it's used the same method to perform one of the actions), the forkJoin is replaced with combineLatest to emit whenever any of the observables emits a value and not to wait for all the observables to complete and then emit an array of the last emitted value from each observable.
To delete a workspace item the logic was missing, so a new component is added. The new component is responsible for deleting a workspace item. When we try to delete a workspace item from Administer workflow we will be redirected to a new page where a table of item's metadata is shown and the cancel and delete actions, which respectively will redirect us to the previous page or performs delete action and then redirect.
List of changes in this PR:
1.value for the workspace item is retrieved from the activated route data,
2.in a similar way, but from different source, the data for dspace object is retrieved,
3. finally, the previous query parameters that were stored in the application's location state are retrieved
Include guidance for how to test or review your PR.
Follow the steps from #2118 to be able to reproduce the behavior and
notice that now:
-a workspace item can be deleted,
-a workflow item can be deleted
-and a workflow item can be sent back.
Checklist
yarn lintyarn check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.