Skip to content

Active reviews count is incorrect #4392

Description

@ajrbyers

Describe the bug
When viewing a list the number of active reviews a reviewer has doesn't look right.

Its possible that reviews that are withdrawn are not removed from the count.

Janeway version
1.7.0

Expected behavior
This count should only show the number of open reviews a user has.

active_reviews_count = models.ReviewAssignment.objects.filter(
is_complete=False,
reviewer=OuterRef("id"),
).values(
"reviewer_id",
).annotate(
rev_count=Count("reviewer_id"),
).values("rev_count")

Metadata

Metadata

Assignees

Labels

Priority urgentUrgent prioritySize XSExtra smallbugSomething's not workingdev-readyThis issue has been refined and is ready for development.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions