Unassign does not clear Active Badge in Add Reviewer dialog

Description of issue or problem I’m having:
In the Add Reviewer modal
Screenshot 2022-06-17 at 14.28.29
dialog, the “active” badge shows “1 active” even when this reviewer has been unassigned by clicking the Unassign button on the review panel.

The Review Requests Cancelled (1) field reflects the Unassignment

There is also a NaN value in the Days Since Last Assigned Field

Steps I took leading up to the issue:
In a Submission in Review phase,

  • Assigned a Reviewer
  • Unassigned this Reviewer
  • Opened the Add Reviewer dialog and view pulldown detail next to Select Reviewer button

What I tried to resolve the issue:
Clear data cache

Application Version - e.g., OJS 3.1.2:
OJS 3.3.0.6

Additional information, such as screenshots and error log messages if applicable:

Hi folks,

I have now investigated this issue and I can confirm that there is an error in the OJS codebase.

I will now raise as an issue over on GH…
The incomplete_count calculation does not account for cancelled review assignments.

Basically this code line (“classes/user/Collector.php #512 ish”) needs to be adjusted…
SELECT COUNT(CASE WHEN date_completed IS NULL AND declined = 0 THEN 1 END) FROM `review_assignments` WHERE reviewer_id = 2424

I’ll then have a shot at a PR and circle back here to cross link the two…

~SteveRoe

Thanks, @SteveRoe! I’ve merged that pull request to main and back-ported the fix for the next 3.3.0-x build.

Regards,
Alec Smecher
Public Knowledge Project Team