Allow commenters to change the status of the issues they open.

Review Request #4380 — Created Aug. 2, 2013 and submitted

Information

Review Board
master

Reviewers

Allow commenters to change the status of the issues they open.

Until now, only the owner of a review request could change the status of an
issue. A frequently recurring request is to allow the person who originally
opened the comment to do the same--especially to be able to reopen it.

This is an update of Niklas Hambuechen's change at
https://reviews.reviewboard.org/r/3837/

I've updated it to address the original concerns with that change, as well as
streamlined a lot of the code.
- Ran unit tests.
- Verified that the "interactive" parameter in the template was correct.
Description From Last Updated

Col: 17 E201 whitespace after '('

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

This will now conflict with my change that's up, but it should be an easy fix.

chipx86chipx86

Col: 80 E501 line too long (110 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (129 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (128 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (117 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (122 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (123 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (135 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (134 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (123 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (128 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (83 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (110 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (129 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (128 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (117 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (122 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (123 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (135 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (134 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (123 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (128 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (83 > 79 characters)

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/webapi/tests.py
        reviewboard/webapi/resources.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/models.py
      Ignored Files:
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. reviewboard/reviews/models.py (Diff revision 1)
     
     
    Show all issues
    Col: 17
     E201 whitespace after '('
    
  3. reviewboard/reviews/models.py (Diff revision 1)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  4. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (110 > 79 characters)
    
  5. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (129 > 79 characters)
    
  6. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (128 > 79 characters)
    
  7. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (117 > 79 characters)
    
  8. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (122 > 79 characters)
    
  9. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  10. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  11. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (123 > 79 characters)
    
  12. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (135 > 79 characters)
    
  13. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (134 > 79 characters)
    
  14. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (123 > 79 characters)
    
  15. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (128 > 79 characters)
    
  16. reviewboard/webapi/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (83 > 79 characters)
    
  17. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/webapi/tests.py
        reviewboard/webapi/resources.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/models.py
      Ignored Files:
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/reviews/models.py (Diff revision 1)
     
     
     
    So, I'm going back and forth on this form. There are times I'm okay with it, and times it annoys me. Using it will annoy ReviewBot every time, though, and I've never seen other Python code do it.
    
    PEP-8 discusses the case of:
    
    if (self.get_review_request... or
        user == self.get_review...):
        bah
    
    and how that looks wrong (except their example is using a def statement). They show:
    
    if (self.get_review_request... or
            user == self.get_review...):
        bah
    
    Which I'm not sure actually looks much better, but it'd keep ReviewBot happy.
    
    http://www.python.org/dev/peps/pep-0008/#indentation
    
    Bah.
    1. I changed it to be the first one, which pep8 is happy with, and in this case it's not that bad since there's no block after it to get confused by.
  3. Show all issues
    This will now conflict with my change that's up, but it should be an easy fix.
    1. Rather, my committed change.
  4. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/webapi/tests.py
        reviewboard/webapi/resources.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/models.py
      Ignored Files:
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (110 > 79 characters)
    
  3. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (129 > 79 characters)
    
  4. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (128 > 79 characters)
    
  5. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (117 > 79 characters)
    
  6. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (122 > 79 characters)
    
  7. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  8. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (123 > 79 characters)
    
  9. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (135 > 79 characters)
    
  10. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (134 > 79 characters)
    
  11. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (123 > 79 characters)
    
  12. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (128 > 79 characters)
    
  13. reviewboard/webapi/tests.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (83 > 79 characters)
    
  14. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/webapi/tests.py
        reviewboard/webapi/resources.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/reviews/models.py
      Ignored Files:
        reviewboard/templates/reviews/comment_issue.html
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (d0ff70d).