don't set "create an issue" when replying to review comments

RESOLVED FIXED

Status

MozReview
Review Board: User Interface
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dustin, Assigned: davidwalsh)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

I've been stopped from autolanding for a contributor twice now, because they reply to a review comment of mine and do not uncheck the "create an issue" checkbox.  This is using the inline, popup reply button -- not the reply button on the page that shows review comments without source code.

Once they open an issue, I can't autoland until that issue is closed, and only the creator can close the issue.
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8824484 [details]
MozReview: Don't open issues by default whe comment is a reply. (Bug 1326043)

https://reviewboard.mozilla.org/r/102966/#review103558

::: reviewboard/reviewboard/static/rb/js/views/commentDialogView_mozreview.js:641
(Diff revision 1)
>                  reviewRequest: reviewRequestEditor.get('reviewRequest'),
>                  reviewRequestEditor: reviewRequestEditor,
>                  publishedComments: options.publishedComments || undefined,
>                  publishedCommentsType: options.publishedCommentsType ||
> -                                       undefined
> +                                       undefined,
> +                isReply: options.publishedComments.length > 0

This code relies on `options.publishedComments` being an array, so that the call to `publishedComments.length` can be made.  It would blow up if `options.publishedComments` is any other type.

Looking at the truth-test on line 638 above, I'm not sure if we can guarantee that `options.publishedComments` is an array every time.  This new code might need an extra safety check on the type of `options.publishedComments`.
Attachment #8824484 - Flags: review?(mars) → review+
(Assignee)

Updated

2 years ago
Assignee: nobody → dwalsh
Comment hidden (mozreview-request)
(Assignee)

Comment 4

2 years ago
mozreview-review
Comment on attachment 8824484 [details]
MozReview: Don't open issues by default whe comment is a reply. (Bug 1326043)

https://reviewboard.mozilla.org/r/102966/#review105012

Mars: Updated your nit.  When approved, please ping smacleod or glob to land.

Comment 5

2 years ago
mozreview-review
Comment on attachment 8824484 [details]
MozReview: Don't open issues by default whe comment is a reply. (Bug 1326043)

https://reviewboard.mozilla.org/r/102966/#review106332

Rubber stamping in order to land.
Attachment #8824484 - Flags: review+

Comment 6

2 years ago
Pushed by mcote@mozilla.com:
https://hg.mozilla.org/webtools/reviewboard/rev/6a630d498278
MozReview: Don't open issues by default whe comment is a reply. r=mars,mcote
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.