Skip to content
Snippets Groups Projects
Commit bdf316f5 authored by Andrei Cioromila's avatar Andrei Cioromila
Browse files

fix(invite): update manuscript status to reviewersInvited after inviting...

fix(invite): update manuscript status to reviewersInvited after inviting reviewers on a minor revision

The status for a minor revision is "review completed" if there have been reviews on previous versions. It had to change to "reviewers invited" after the first invite on the revision
parent 8faa8420
No related branches found
No related tags found
3 merge requests!162Sprint 23 Features,!161Deploy S23 features and fixes,!159Hin 1153 status after review
......@@ -4,6 +4,7 @@ const {
services,
Collection,
Invitation,
Fragment,
authsome: authsomeHelper,
} = require('pubsweet-component-helper-service')
......@@ -116,7 +117,12 @@ module.exports = models => async (req, res) => {
})
}
if (collection.status === 'heAssigned') {
const fragmentHelper = new Fragment({ fragment })
if (
collection.status === 'heAssigned' ||
(collection.status === 'reviewCompleted' &&
!fragmentHelper.hasReviewReport())
) {
collectionHelper.updateStatus({ newStatus: 'reviewersInvited' })
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment