Fix `rbt status` returning blank summary for draft review requests
Review Request #11174 — Created Sept. 18, 2020 and submitted
When displaying the summary for the review request, the code attempts to get the
summary from request.summary, which is null for draft reviews. In this
code change, we added a condition on where to get the summary - if the
draft exists, we get the draft summary; otherwise we get it from the
published review request.The issue was fixed by the code change.
- Reproduced issue in 4855, confirmed the summary for a draft review shows as expected after the code change
+--------+-----------------------------------------------------+---------------+ | Status | Review Request | Branch | +========+=====================================================+===============+ | Draft | r/11174 - fix 4855:rbtools 1.0.2 returns blank | release-1.0.x | | | summary for draft review requests | | +--------+-----------------------------------------------------+---------------+
- Ran the unit tests using
./tests/runtests.py
, all passed.
Description | From | Last Updated |
---|---|---|
The summary and description can be improved here. We generally don't need to list bug numbers or versions there, since … |
david | |
Getting pretty close. Can we make a couple little tweaks in the description? Please wrap it to 70 columns. The … |
david | |
Looks like the description is wrapping a bit too early. Can you target ~70 (upwards of 75) characters for the … |
chipx86 | |
In your description, you use "CR", which isn't an abbreviation that we use in the codebase. Let's say "summary for … |
david | |
In testing done, it's better to use ./tests/runtests.py rather than nosetests. They're mostly the same thing, but just to be … |
david | |
E501 line too long (87 > 79 characters) |
reviewbot | |
It's just a tiny style nitpick, but can we add a blank line between these two please? |
david | |
Let's add a trailing comma at the end of this line. |
david |
- Change Summary:
-
Fixed flake8 alert for line being too long
- Commit:
-
679c467d4a2310c68b91d5fc9f4f57eb5645d6b9bdfd95caed8e562fe80463164c5ca97d7d6ab793
- Diff:
-
Revision 2 (+5 -1)
Checks run (2 succeeded)
-
-
The summary and description can be improved here. We generally don't need to list bug numbers or versions there, since that data is elsewhere in the review request fields (branch / bugs fields).
See https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea for our guide on what we like to see for the summary and description.
-
- Change Summary:
-
Addressed feedback on style, summary and description.
- Summary:
-
fix 4855:rbtools 1.0.2 returns blank summary for draft review requestsFix `rbt status` returning blank summary for draft review requests
- Description:
-
~ fix 4855:rbtools 1.0.2 returns blank summary for draft review requests
~ Fix
rbt status
returning blank summary for draft review requests.+ + When displaying the summary for the CR, the code attempts to get the summary from
request.summary
, which is null for draft reviews. In this code change, we added a condition on where to get the summary - for drafts, get the summary fromrequest.draft[0]['summary']
; for published reviews, get the summary fromrequest.summary
.+ + The issue was fixed by the code change.
- Testing Done:
-
~ - Reproduced issue in 4855, confirmed the summary shows as expected after the code change
~ - Reproduced issue in 4855, confirmed the summary for a draft review shows as expected after the code change
+--------+-----------------------------------------------------+---------------+
| Status | Review Request | Branch |
+========+=====================================================+===============+
| Draft | r/11174 - fix 4855:rbtools 1.0.2 returns blank | release-1.0.x |
| | summary for draft review requests | |
+--------+-----------------------------------------------------+---------------+
- nosetests -v
Ran 246 tests in 259.869s
OK (SKIP=7)
- Commit:
-
bdfd95caed8e562fe80463164c5ca97d7d6ab7934eb162ca2479030678e148bf3500a64c38f30be8
- Diff:
-
Revision 3 (+6 -1)
Checks run (2 succeeded)
-
-
Getting pretty close. Can we make a couple little tweaks in the description?
Please wrap it to 70 columns.
The first line there duplicates what you have in the summary, and can be deleted.
We don't need to include quite so much actual code snippet in the description--if I want to know exactly what the code does, I'll look at the diff. Let's just say that if the draft exists, we get the draft summary, otherwise we get it from the published review request.
-
- Change Summary:
-
Addressed feedback on trailing comma and description.
- Description:
-
~ Fix
rbt status
returning blank summary for draft review requests.~ ~ When displaying the summary for the CR, the code attempts to get the summary from
request.summary
, which is null for draft reviews. In this code change, we added a condition on where to get the summary - for drafts, get the summary fromrequest.draft[0]['summary']
; for published reviews, get the summary fromrequest.summary
.~ When displaying the summary for the CR, the code attempts to get
~ the summary from request.summary, which is null for draft reviews. ~ In this code change, we added a condition on where to get the + summary - if the draft exists, we get the draft summary; + otherwise we get it from the published review request. The issue was fixed by the code change.
- Commit:
-
4eb162ca2479030678e148bf3500a64c38f30be88f635ea73715a882beb99b57f8cc38b3e01c2789
- Diff:
-
Revision 4 (+6 -1)
Checks run (2 succeeded)
-
-
Looks like the description is wrapping a bit too early. Can you target ~70 (upwards of 75) characters for the wrap point? Helps keep it from appearing really short. A good trick is to compose it in an editor with a wrap point (Review Board doesn't do this built-in because different companies/teams have different requirements).
- Change Summary:
-
Updated description.
- Description:
-
~ When displaying the summary for the CR, the code attempts to get
~ the summary from request.summary, which is null for draft reviews. ~ In this code change, we added a condition on where to get the ~ summary - if the draft exists, we get the draft summary; ~ otherwise we get it from the published review request. ~ When displaying the summary for the CR, the code attempts to get the
~ summary from request.summary, which is null for draft reviews. In this ~ code change, we added a condition on where to get the summary - if the ~ draft exists, we get the draft summary; otherwise we get it from the ~ published review request. The issue was fixed by the code change.
-
Just a couple very minor comments about your review request metadata:
-
In your description, you use "CR", which isn't an abbreviation that we use in the codebase. Let's say "summary for the review request".
-
In testing done, it's better to use
./tests/runtests.py
rather thannosetests
. They're mostly the same thing, but just to be consistent let's prefer the former. You also don't necessarily need to include the output from the suite, you can just say you ran the unit tests.
- Change Summary:
-
Addressed feedback about the description and testing section.
- Description:
-
~ When displaying the summary for the CR, the code attempts to get the
~ When displaying the summary for the review request, the code attempts to get the
summary from request.summary, which is null for draft reviews. In this code change, we added a condition on where to get the summary - if the draft exists, we get the draft summary; otherwise we get it from the published review request. The issue was fixed by the code change.
- Testing Done:
-
- Reproduced issue in 4855, confirmed the summary for a draft review shows as expected after the code change
+--------+-----------------------------------------------------+---------------+
| Status | Review Request | Branch |
+========+=====================================================+===============+
| Draft | r/11174 - fix 4855:rbtools 1.0.2 returns blank | release-1.0.x |
| | summary for draft review requests | |
+--------+-----------------------------------------------------+---------------+
~ - nosetests -v
~ - Ran the unit tests using
./tests/runtests.py
, all passed.
- - Ran 246 tests in 259.869s
- - OK (SKIP=7)
-