Fix counters when joining or leaving review groups.

Review Request #10722 — Created Sept. 24, 2019 and submitted

chipx86
Review Board
release-3.0.x
7d639fd...
reviewboard

When users join or leave review groups, their incoming review request
counter retains its older value, leading to discrepencies that only get
fixed with resetting that counter on their profile. This is an old bug,
which oddly we haven't heard anything about (at least directly -- it may
have been the unknown cause of some bug reports in the past).

We now listen for membership changes on groups and perform a reset on
any profiles that may exist that pertain to the users involved in the
change. This clears out the counter, which is fast, causing it to be
recalculated the next time it's loaded.

This works whether a user changes their own membership or an admin
bulk-modifies the membership on a group through the Admin UI.

Unit tests pass.

Description From Last Updated

F841 local variable 'review_request2' is assigned to but never used

reviewbotreviewbot

F841 local variable 'review_request2' is assigned to but never used

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (e817a94)
Loading...