Adding my reviews section to the dashboard's sidebar.

Review Request #9246 - Created Oct. 9, 2017 and updated

Mukhtar Alhejji
Review Board
master
ceed173...
reviewboard, students

When user login to Review Board dashboard, they would like
to see all their open requests from incoming and outgoing.
Therefore, adding a new section that is called 'My Reviews'
will allow users to see all their open requests.

Added a unit test, which passes (along with all other tests).

  • Created test review requests that will be open under incoming and
    outgoing sections.
  • Ran it using this command ./tests/runtests.py
    reviewboard.reviews.tests.test_review_request_manager
  • The test calls the query that merge the requests.
  • It will check if the requests are merged successfully than it passes
    the test.
  • 0
  • 0
  • 42
  • 3
  • 45
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

David Trowbridge
  1. 
      
  2. It looks like your project code and your bug fix code got combined together. This shouldn't be part of this change. If you need help untangling this, please ping @mentors in slack.

    1. I didn't notice that I didn't create branch from master. However, I decided to open a new Review Request that is #9294.

  3. 
      
Mukhtar Alhejji
Mukhtar Alhejji
Review request changed

Description:

~  

[Will fix it later] Adding my reviews section to the dashboard sidebar.

  ~

[Will fix it later] Adding my reviews section to the dashboard sidebar.

-   Decided to ignore this one and moved to the new Review Request #9294

Branch:

-release-3.0.x
+master

Commit:

-8da72b57962cead36de11eac414c1b7a4d4d0259
+4ac8ceb5715426c36421c76698337c5ff54e7d88

Diff:

Revision 2 (+29)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Mukhtar Alhejji
Review request changed

Commit:

-4ac8ceb5715426c36421c76698337c5ff54e7d88
+6418c8a0cbee8db932ef79b7c79734e0c184621f

Diff:

Revision 3 (+85)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Mukhtar Alhejji
Review request changed

Commit:

-6418c8a0cbee8db932ef79b7c79734e0c184621f
+a25c02bbb2ba1906cee78173ca9be03ee8e2a27a

Diff:

Revision 4 (+59)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

David Trowbridge
  1. 
      
  2. reviewboard/datagrids/builtin_items.py (Diff revision 4)
     
     
     
     
     
     
     
     

    This isn't correct (copy/paste-o?)

    1. I noticed that and fixed it, but didn't publish the newest-modified review request.

  3. reviewboard/datagrids/builtin_items.py (Diff revision 4)
     
     

    This should have a "Yields:" section. See https://www.notion.so/reviewboard/Writing-Codebase-Documentation-e16312b5f061437cb73cbfa369ac3cb5

  4. reviewboard/datagrids/builtin_items.py (Diff revision 4)
     
     

    The view ID should use a hyphen rather than an underscore.

  5. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    I suspect we want this to be the first item in the sidebar.

  6. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    This should probably be changed to "My open outgoing review requests"

  7. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    This should probably be changed to "All my open outgoing review requests"

  8. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    We should change this to use sentence casing rather than title casing.

  9. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    Can we put this as the first thing checked? The view string should also have a hyphen instead of an underscore.

  10. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    This should probably be "My open incoming and outgoin review requests"

  11. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    Should change this to be sentence casing.

  12. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    Should change this to be sentence casing.

  13. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    Should change this to be sentence casing.

  14. reviewboard/datagrids/grids.py (Diff revision 4)
     
     

    Should change this to be sentence casing.

  15. reviewboard/reviews/managers.py (Diff revision 4)
     
     

    This should probably be named get_my_reviews_query to match other, similar method names.

  16. reviewboard/reviews/managers.py (Diff revision 4)
     
     

    The docstring here needs "Args:" and "Returns:" sections. See https://www.notion.so/reviewboard/Writing-Codebase-Documentation-e16312b5f061437cb73cbfa369ac3cb5 for some info on these.

  17. reviewboard/reviews/managers.py (Diff revision 4)
     
     

    This needs a docstring (I know others don't have them but they're old code).

  18. 
      
Mukhtar Alhejji
Mukhtar Alhejji
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

David Trowbridge
  1. 
      
  2. reviewboard/accounts/admin.py (Diff revision 6)
     
     

    Can we call the column "my_reviews_count" to match the name used elsewhere? "my review request count" sounds almost like it's the outgoing review requests.

  3. reviewboard/datagrids/builtin_items.py (Diff revision 6)
     
     

    This needs a "Yields" section.

  4. reviewboard/datagrids/grids.py (Diff revision 6)
     
     

    typo: outgoin

  5. reviewboard/datagrids/grids.py (Diff revision 6)
     
     

    This shouldn't include the word "open", since it's all including both open and closed.

  6. reviewboard/reviews/managers.py (Diff revision 6)
     
     

    This should be in the imperative mood ("Return" instead of "Returns").

    This docstring also needs Args/Returns sections.

    1. Should I also change the others to be in the imperative mood (I mean the old code)?

    2. If you want to do that in a separate change that's fine but I wouldn't include it in this.

  7. reviewboard/reviews/managers.py (Diff revision 6)
     
     

    This needs a docstring.

  8. 
      
Mukhtar Alhejji
Mukhtar Alhejji
Mukhtar Alhejji
Giulia Mattia
  1. 
      
  2. New file should include module docstring.

    1. This is only to add evolution to the DB. I don't think it needs docstring.

  3. reviewboard/reviews/managers.py (Diff revision 9)
     
     

    Maybe add a description of what get_my_reviews_query does, and add as an additional note that it's meant to be passed to ReviewRequest.objects.public()

  4. 
      
Mukhtar Alhejji
Review request changed
Loading...