Skip to content

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

Open
wants to merge 2 commits into
base: stable-3_5_0
Choose a base branch
from

Conversation

jardakotesovec
Copy link
Contributor

No description provided.

$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
Copy link
Contributor Author

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);
}

Copy link
Contributor Author

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();
}
Copy link
Contributor Author

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])) {
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant