opensafely-core / airlock

Other
1 stars 0 forks source link

Only count votes from completed reviews in overall file decisions #550

Closed rebkwok closed 1 month ago

rebkwok commented 1 month ago

Fixes #494

It's trivial to only count votes in the current turn for completed reviews. However, when a request is returned to a user, we want the user to be able to see the decisions from the previous turn, so I needed to store the users who had completed a review at the end of each turn on the request.

madwort commented 1 month ago

At the moment, approval reviews persist across rounds & request for changes reviews are reset every round. Would this implementation mean effectively that a reviewer who has approved all files still has to hit the "complete" button every review round in order for their approval reviews to persist?

rebkwok commented 1 month ago

Would this implementation mean effectively that a reviewer who has approved all files still has to hit the "complete" button every review round in order for their approval reviews to persist?

This is already the case. The start_new_turn already set completed_reviews to an empty dict, so if you'd approved everything in the previous round, your file approvals remain, but you still have to click the complete button again.