User can both accept and decline a reviewer invitation
Expected behaviour
A reviewer assigned to a review should only be able to accept/decline an invitation. Only the first action of accept/reject should be captured and displayed in the control panel>teams or control panel>decision pages
Current behaviour
A reviewer receives a 'Reviewer invitation' email notification; the reviewer can 'accept' from the token link embedded within the email body text. The same reviewer can also go back into the same email and select 'decline' from the same email.
The first action of 'accept' is preserved and the user can move through the review workflow as intended. The second action of 'decline' is also preserved where the user is presented with the 'decline invitation' landing page and can insert a reason for declining and/or an option to opt-out. On submission, this is displayed in the control panel. This can be confusing to editors, as the first action is actually the workflow the user will be able to act on.
This scenario does not work in reverse. If a user declines an invitation, when trying to accept from the same email - they are presented with the 'link expired' landing page as intended.
Steps to reproduce
- Send a user a reviwer invitation email notification
- User clicks on accept and logs in to Kotahi
- User clicks on continue review and as can edit the review form
- User clicks on decline and is directed to the 'decline invitation' landing page
- User submits 'decline invitation'
- Editor can see the declined review from the control panel>Decision page and accept progress from the control panel>team page.