Fix counters when discarding or deleting draft review requests.

Review Request #2504 — Created July 31, 2011 and submitted

Information

Review Board
master

Reviewers

Fix counters when discarding or deleting draft review requests.

The counters in the sidebar would get messed up when discarding or
deleting a draft review request. The code assumed that if we were saving or
deleting a non-pending review request, we should decrement counts. However,
this needed to take into account the old public state to determine if it
had already incremented these counts.

New unit tests were added to check for these conditions and to check
for incrementing/decrementing on fields not yet initialized (such as after
an upgrade).
Unit tests pass.
chipx86
david
  1. Looks good. Thanks for updating the tests too!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Committed to master (94e5004)