Fix counters when joining or leaving review groups.

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

Information

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

Reviewers

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.

    Loading...