-
Notifications
You must be signed in to change notification settings - Fork 460
pkp/pkp-lib#10359 record dateConsidered for automatic Acknoledment #11284
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
base: stable-3_5_0
Are you sure you want to change the base?
Conversation
$newReviewData['considered'] = $reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW | ||
// if the review assignment had been unconsidered or only viewed but not considered, update the flag. | ||
$newReviewData['considered'] = ($reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW || | ||
$reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_VIEWED) | ||
? ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat related problem while testing. I noticed that I was getting REVIEW_ASSIGNMENT_RECONSIDERED
, even after simple confirmation. Thats because we have also the REVIEW_ASSIGNMENT_VIEWED now.
if(!empty($updateData)) { | ||
Repo::reviewAssignment()->edit($reviewAssignment, $updateData); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now aligned with the ThankReviewer Form
if(!$reviewAssignment->getDateConsidered()) { | ||
// set the date when the editor confirms the review | ||
$newData['dateConsidered'] = Core::getCurrentDate(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed while testing, that after thanking it overrode the dateConsidered to currentDate. So also moved it behind condition.
@@ -149,13 +149,16 @@ public function execute(...$functionArgs) | |||
// update the ReviewAssignment with the acknowledged date | |||
$newData = ['dateAcknowledged' => Core::getCurrentDate()]; | |||
if (!in_array($reviewAssignment->getConsidered(), [ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED, ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure when this could happen... because in UI its needs to be confirmed, before thanking. But since its here I followed same logic for the NotifyReviewer
No description provided.