Detecting reviewer acceptance

Hey,
I’m looking for a hook to register when a reviewer accepts an assignment. Using ReviewerAction::confirmReview, I get the submission, but not the review assignment. The user interface seems to allow for multiple simultaneous review rounds of the same submission, so with just the submission, it will not be clear which of the review rounds it is referring to.

Alternatively, if I listen to reviewassignmentdao::_updateobject, the only fields that looks different from the initial creation of the review assignment are competing_interest and recommendation which both change from none to 0. Checking for the date_confirmed field is not simply as it is not given as one of the arguments.

So the question is: Is there a better way than checking whether the recommendation is being set to 0? Because that doesn’t seem super-intuitive and more like something that may change with a minor version update.

Hi @Johannes_Wilm,

I took a look and i think you’re right, the DAO hook is probably not going to be great for a few reasons. The appropriate hook would be in the execute method of ReviewerReviewStep3Form. All forms should call parent::execute(), which will eventually fire Form::execute():

This would eventually fire a hook: reviewerreviewstep3form::execute. That would get you access to the Form and, through that, the reviewer assignment: $reviewerStep3Form->getReviewAssignment().

However, and here’s the bad news, we never actually call parent::execute(), so the hook never fires. :frowning:

I’ve filed an issue to address this that will hopefully make it into the next version, 3.1.1.

Thanks for adding it to 3.1.1. So does that mean we should assume that the only way to accept the review is through that form? There is no way for a plugin or alike to add other ways of accepting to take on a review?

Hi @Johannes_Wilm,

Unfortunately, no, we can’t say that with any certainty. In OJS 3.1.1 it’s the only way through the standard installation for the reviewer to accept the review. However, eventually this is something we hope to also put through a service class, with a consistent hook, so that we can be more confident that such a change will always be hooked.

This is the idea of the DAO hook but as you said there are reasons why this one might not be ideal.