Closed Bug 1234161 Opened 6 years ago Closed 6 years ago

Don't render filediff review button on drafts

Categories

(MozReview Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdoglio, Assigned: mdoglio)

References

Details

Attachments

(1 file)

Drafts don't have a get_diffsets method, which is used to retrieve the data for the filediff buttons. The diff view is currently broken.
Assignee: nobody → mdoglio
Status: NEW → ASSIGNED
Comment on attachment 8700576 [details]
MozReview Request: mozreview: don't render filediff buttons on drafts (bug 1234161); r?smacleod

https://reviewboard.mozilla.org/r/28767/#review26217

::: pylib/mozreview/mozreview/fields.py:311
(Diff revision 1)
> +                type(self.review_request_details) == ReviewRequest):

The case where the review request is not published yet will still get past this (there is no draft I believe, just `.public=False`)
Attachment #8700576 - Flags: review?(smacleod)
https://reviewboard.mozilla.org/r/28767/#review26217

> The case where the review request is not published yet will still get past this (there is no draft I believe, just `.public=False`)

That shouldn't be a big deal. As long as we get a ReviewRequest object we can call .get_diffsets() on it and that's all we need, right?
Duplicate of this bug: 1237381
https://reviewboard.mozilla.org/r/28767/#review26217

> That shouldn't be a big deal. As long as we get a ReviewRequest object we can call .get_diffsets() on it and that's all we need, right?

Yup, you're absolutely correct. Lets use isinstance instead of type here though and it should be good.
https://reviewboard.mozilla.org/r/28767/#review26711

::: pylib/mozreview/mozreview/fields.py:311
(Diff revision 1)
> +                type(self.review_request_details) == ReviewRequest):

use isinstance instead of type
Comment on attachment 8700576 [details]
MozReview Request: mozreview: don't render filediff buttons on drafts (bug 1234161); r?smacleod

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28767/diff/1-2/
Attachment #8700576 - Flags: review?(smacleod)
Attachment #8700576 - Flags: review?(smacleod) → review+
Comment on attachment 8700576 [details]
MozReview Request: mozreview: don't render filediff buttons on drafts (bug 1234161); r?smacleod

https://reviewboard.mozilla.org/r/28767/#review27313
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.