Skip to content
Snippets Groups Projects

Sprint 17 features

Merged Bogdan Cochior requested to merge develop into master
1 file
+ 19
13
Compare changes
  • Side-by-side
  • Inline
const config = require('config')
const { chain, get } = require('lodash')
const { chain, get, isEmpty } = require('lodash')
const {
User,
@@ -58,9 +58,13 @@ module.exports = {
comments = eicComments
}
const hasPeerReview = (collection = {}) =>
!isEmpty(collection.handlingEditor)
if (
(isEditorInChief || newRecommendation.recommendationType === 'review') &&
collection.status !== 'rejected'
hasPeerReview(collection)
) {
// the request came from either the Editor in Chief or a reviewer, so the HE needs to be notified
sendHandlingEditorEmail({
@@ -81,17 +85,19 @@ module.exports = {
newRecommendation.recommendationType !== 'review' &&
newRecommendation.recommendation !== 'return-to-handling-editor'
) {
sendAuthorsEmail({
email,
baseUrl,
titleText,
parsedFragment,
fragmentAuthors,
isEditorInChief,
subjectBaseText,
newRecommendation,
})
if (collection.status !== 'rejected') {
if (isEditorInChief || collection.status === 'revisionRequested') {
sendAuthorsEmail({
email,
baseUrl,
titleText,
parsedFragment,
fragmentAuthors,
isEditorInChief,
subjectBaseText,
newRecommendation,
})
}
if (hasPeerReview(collection)) {
sendReviewersEmail({
email,
baseUrl,