Add debugging and a script for issue count calculation.

Review Request #6366 — Created Sept. 23, 2014 and submitted

Information

Review Board
release-2.0.x
3ca3c08...

Reviewers

There have been some reports of issue counts failing to calculate
correctly. The cause is not obvious, so we need better debugging.

This adds some debug logging to show all the calculation state for a
given review request's issues, which users can send us when they
encounter problems.

It also adds a reset-issue-counts management command, which will reset
issue counts for particular review requests, or all review requests if
passing --all.

Ran without any arguments. Saw an error.

Ran with a list of IDs. Saw it reset those counts.

Ran with --all. Saw it reset all IDs.

Ran with --recalculate --verbosity=2. Saw the debug output.

Verified these in the database.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/management/commands/reset-issue-counts.py
        reviewboard/reviews/models/review_request.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/management/commands/reset-issue-counts.py
        reviewboard/reviews/models/review_request.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/management/commands/reset-issue-counts.py
        reviewboard/reviews/models/review_request.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/management/commands/reset-issue-counts.py
        reviewboard/reviews/models/review_request.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (f5c10d5)