Skip to content

Commit

Permalink
pkp#7486 Updated thank you considered status modification logic
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir authored and asmecher committed Feb 14, 2023
1 parent 6b8153d commit 1e55ccc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions controllers/grid/users/reviewer/form/ThankReviewerForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,13 @@ public function execute(...$functionArgs)
$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO'); /** @var ReviewAssignmentDAO $reviewAssignmentDao */
$reviewAssignment->setDateAcknowledged(Core::getCurrentDate());
$reviewAssignment->stampModified();
$reviewAssignment->setConsidered(
$reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW
? ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED
: ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED
);
if(!in_array($reviewAssignment->getConsidered(), [ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED, ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED])) {
$reviewAssignment->setConsidered(
$reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW
? ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED
: ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED
);
}
$reviewAssignmentDao->updateObject($reviewAssignment);

parent::execute(...$functionArgs);
Expand Down

0 comments on commit 1e55ccc

Please sign in to comment.