I’m working with the code for SEs to cancel reviews and am puzzled by a piece of code in the SectionEditorAction::cancelReview function. There is a test to check if it is valid for the SE to cancel the review based on whether the reviewer was 1) notified, 2) not previously cancelled 3) still underway (and 4 did not decline the review???). The code at line 315 reads:
if ($reviewAssignment->getSubmissionId() == $sectionEditorSubmission->getId()) {
// Only cancel the review if it is currently not cancelled but has previously
// been initiated, and has not been completed.
if ($reviewAssignment->getDateNotified() != null && !$reviewAssignment->getCancelled() && ($reviewAssignment->getDateCompleted() == null || $reviewAssignment->getDeclined())) {
I think that last term in bold is incorrect and unnecessary. If the reviewer declines the review request, the review assignment disappears from the peerReview.tpl summary page and the SE can’t click “cancel”. And even if it didn’t disappear from the page, it would only make sense to cancel assignments that had not been previously declined. Am I misunderstanding the purpose of this code?
Roger