Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced workflow actions - framework & workflows scoreReview and selectSingleReviewer #2039

Merged
merged 41 commits into from
Feb 10, 2023

Conversation

MarieVerdonck
Copy link
Contributor

@MarieVerdonck MarieVerdonck commented Jan 12, 2023

References

Fixes #770
Corresponding REST PR: DSpace/DSpace#8629

Description

Framework for advanced workflow steps/actions, i.e. actions that can't easily be represented by just a button (with possible modal) but will rather open in a new page.

Pages for the two already configured more advanced workflows: selectSingleReviewer and scoreReview have also been added.

Instructions for Reviewers

scoreReview workflow

  • As admin:
    • Create a test collection for scoreReview workflow test & configure in workflow.xml that collection's handle for the scoreReview workflow
    • Set on the edit collection > assign roles tab: submitters group with a member and the workflow group 'Score Reviewers' with at least 2 members (configured requiredUsers is 2)
  • Submit item in this collection as regular user (submitter from above)
  • Log in as first member of score reviewers group
    • Go to /mydspace?configuration=workflow => This user should be able to claim created item in workflow
    • Click on 'Rate' option
      • Should see form with required inputs for a review (text) and rating (out of maxValue, default 10)
      • Changing config in workflow-actions.xml descriptionRequired and maxValue should alter this form
      • Try to submit without review if descriptionRequired=true => will be prevented; if set to false can still be sent / saved on item but it optional
      • Do 2 star rating with description
  • Repeat as second member of score reviewers group (needs 2 different score reviewers before going towards next step in workflow)
    • Verify workflow item has rating from first reviewer in metadata under fields workflow.score and workflow.review
  • Verify as original submitter the workflow item is back in submission
    • Verify as admin this item has dc.decription.provenance indicating it was rejected because of insufficient score (/server/api/submission/workspaceitems/{wsiId}/item)
    • Verify it no longer contains the workflow metadata
    • Submit item again
  • Do the rating by the 2 score reviewers again, but now rate 2 and 4 => mean 3 (in workflow-actions.xml config minimumAcceptanceScore determines minimum mean)
    • Verify as admin this item has dc.decription.provenance indicating it was accepted with mean score & reviews entered (/server/api/core/items/{itemUuid})
    • Verify it nog longer contains the workflow metadata

selectSingleReviewer workflow

  • As admin:
    • Create a test collection for selectSingleReviewer workflow test & configure in workflow.xml that collection's handle for the selectSingleReviewer workflow (configure in edit collection > assign roles the submitters group with at least 1 submitter)
    • Create two repository wide groups named 'ReviewManagers' (at least 1 member) and 'Reviewers' (at least 6 members, to test pagination)
      • Make the 'ReviewManagers' a subgroup of Admin (see ToDo below)
  • Submit item in this collection as regular user (submitter from above)
  • Log in as a member of 'ReviewManagers'
    • Go to /mydspace?configuration=workflow => This user should be able to claim created item in workflow
    • Click on 'Select Reviewer' option
      • Verify the members of the 'Reviewers' group are listed as options to select from (config action.selectrevieweraction.group = Reviewers) - test pagination
      • Select 1 or more members as reviewers and confirm (can select & unselect)
    • Log in as (one of) selected reviewer(s)
      • Go to /mydspace?configuration=workflow => This user should have the item it was selected as reviewer for already claimed (auto assign selection configured) and should have buttons for options: accept, reject (with reason) and decline task
      • 4 cases:
        • Accept => Item should get archived
          • As admin: Verify info about which workflow step approved it and which user/reviewer reviewed it in item's md dc.description.provenance
        • Reject with reason
          • Original submitter still exists => Workflow item back to workspace item for original submitter (email sent & provenance)
            • Verify as admin this item has dc.decription.provenance indicating it was rejected including who rejected it with their entered reason (/server/api/submission/workspaceitems/{wsiId}/item)
          • Original submitter no longer exists => Workflow item is deleted
        • Decline => Workflow is restarted so 'ReviewManager' needs to once again claim workflow item and select reviewers

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

alexandrevryghem and others added 16 commits January 4, 2023 22:25
…dvancedWorkflowActionSelectReviewerComponent
…_advanced-workflow-actions-main

# Conflicts:
#	src/app/access-control/access-control.module.ts
#	src/app/access-control/group-registry/group-form/eperson-list/eperson-list.component.spec.ts
#	src/app/access-control/group-registry/group-form/eperson-list/eperson-list.component.ts
#	src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
#	src/assets/i18n/en.json5
@github-actions
Copy link

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


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@MarieVerdonck MarieVerdonck marked this pull request as ready for review January 13, 2023 11:10
…_advanced-workflow-actions-main

# Conflicts:
#	src/app/core/core.module.ts
#	src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.spec.ts
…workflow-actions-main

# Conflicts:
#	src/app/shared/shared.module.ts
Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

thanks @MarieVerdonck

I've not yet fully reviewed but I'm adding a first suggestion

package.json Outdated Show resolved Hide resolved
Copy link
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 @MarieVerdonck and @alexandrevryghem ! I've retested this today. I've verified that the fixes to the backend PR have fixed the bug related to the "Decline" button (in SingleReviewer workflow). I've also verified that after the removal of ngx-bootstrap, the scoreReview workflow is still working properly.

@atarix83 : Please give this a re-review, as @alexandrevryghem was able to remove ngx-bootstrap as you requested.

Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

@MarieVerdonck

I've tested it and it's overall good.
I just have to report a small malfunctions when navigating among the new workflow pages and the mydspace page.

  • with the rating workflow when I search for a workflow item which title contains a space e.g.
    MicrosoftTeams-image (3)

and then from the workflow rating page i click on the back button, I'm redirected to the previous page but the url contains wrong encoded chars and as a result the item is not found because the search is wrong

MicrosoftTeams-image (4)

  • with the selecting reviewer(s) workflow instead when passing back from the select reviewer(s) page and the mydspace page the query search is not maintened

This is not a big issue but if it can be resolved quickly it'd be great.

For the rest this is a +1 for me

…ons-7.2' into w2p-98211_advanced-workflow-actions-main

# Conflicts:
#	src/app/shared/testing/active-router.stub.ts
#	src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component.ts
@alexandrevryghem alexandrevryghem force-pushed the w2p-98211_advanced-workflow-actions-main branch from 23ad4e7 to 67c6684 Compare February 10, 2023 12:37
@alexandrevryghem
Copy link
Member

@atarix83 can you give it a re-review? Both problems should be fixed now

…_advanced-workflow-actions-main

# Conflicts:
#	src/app/shared/testing/active-router.stub.ts
@github-actions
Copy link

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


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@tdonohue
Copy link
Member

@MarieVerdonck & @alexandrevryghem : My apologies, another merger caused more merge conflicts here.

@atarix83 : Can you re-review this today? If not, I can try and verify the issues you found are now fixed

Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

thanks @MarieVerdonck

it's working properly now, after the merge conflicts are resolved this PR can be merged

# Conflicts:
#	src/app/shared/shared.module.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support for General Configurable Workflow steps
6 participants