Flag notification bugmail should include the comment, even for API attachment submissions

RESOLVED DUPLICATE of bug 508541

Status

()

defect
--
major
RESOLVED DUPLICATE of bug 508541
5 years ago
5 years ago

People

(Reporter: emorley, Unassigned)

Tracking

Details

Reporter

Description

5 years ago
For the change in bug 1054112 comment 1 ("Create attachment with comment and request review from emorley") I received two bugmails (as usual) - the "review requested" one and the "someone has commented" one.

For the review requested bugmail, the comment was missing.

ie bug 1054112 comment 1 has:
{
/r/104 - Bug 1054112 - Install hghooks package into testing environment
/r/105 - Bug 1054112 - Convert try-mandatory hook tests into .t tests
}

And so does the "someone has commented" bugmail.

Whereas the flag requested just says:
{
Gregory Szorc [:gps] <gps@snip.com> has asked Ed Morley [:edmorley]
<emorley@snip.com> for review:
Bug 1054112: Convert some hooks tests to Mercurial testing format
https://bugzilla.mozilla.org/show_bug.cgi?id=1054112

Attachment 8473416 [details]: Review for review ID: bz://1054112/gps
https://bugzilla.mozilla.org/attachment.cgi?id=8473416&action=edit
}

I'm presuming this is something to do with the ReviewBoard integration, as opposed to a regression to bugmail in general.
I believe this is because we are posting the attachment without a description, and then posting the comment about it separately.

We should probably change the behaviour here and stick the comment inside the update of the attachment. dkl, mcote, you're the Bugzilla guys, thoughts?
Blocks: 1021929
Flags: needinfo?(mcote)
Flags: needinfo?(dkl)
Reporter

Comment 2

5 years ago
(In reply to Steven MacLeod [:smacleod] from comment #1)
> I believe this is because we are posting the attachment without a
> description, and then posting the comment about it separately.

But the comment text is in the same bugzilla comment as the "attachment created" when looking at bug 1054112 comment 1?

Or is rbbz doing lower level DB updates in different transactions, rather than using the REST API?
(In reply to Ed Morley [:edmorley] from comment #2)
> (In reply to Steven MacLeod [:smacleod] from comment #1)
> > I believe this is because we are posting the attachment without a
> > description, and then posting the comment about it separately.
> 
> But the comment text is in the same bugzilla comment as the "attachment
> created" when looking at bug 1054112 comment 1?
> 
> Or is rbbz doing lower level DB updates in different transactions, rather
> than using the REST API?

Ah you're right, it is posting it along with it [1]. rbbz is still using the xmlrpc API to talk to bugzilla, but there are plans to move it to the REST API eventually. I think I'll let dkl/mcote figure out what's going wrong here, my bugzilla knowledge is limited.

[1] https://hg.mozilla.org/hgcustom/version-control-tools/file/270fc247af25/pylib/rbbz/rbbz/bugzilla.py#l131
(In reply to Steven MacLeod [:smacleod] from comment #3)
> (In reply to Ed Morley [:edmorley] from comment #2)
> > (In reply to Steven MacLeod [:smacleod] from comment #1)
> > > I believe this is because we are posting the attachment without a
> > > description, and then posting the comment about it separately.
> > 
> > But the comment text is in the same bugzilla comment as the "attachment
> > created" when looking at bug 1054112 comment 1?
> > 
> > Or is rbbz doing lower level DB updates in different transactions, rather
> > than using the REST API?
> 
> Ah you're right, it is posting it along with it [1]. rbbz is still using the
> xmlrpc API to talk to bugzilla, but there are plans to move it to the REST
> API eventually. I think I'll let dkl/mcote figure out what's going wrong
> here, my bugzilla knowledge is limited.

Flag notifications emails do not contain the comment unless the change was done through the Bugzilla web UI. For flags requests created through the webservice API, the comment is not included. Admittedly this should be fixed upstream but is current behavior.

dkl
Flags: needinfo?(mcote)
Flags: needinfo?(dkl)
Reporter

Comment 5

5 years ago
Ah ok, thank you :-)
Assignee: nobody → webservice
Component: rbbz → WebService
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: Comment is missing from "review requested" bugmail → Flag notification bugmail should include the comment, even for API attachment submissions
Version: Production → unspecified
Reporter

Comment 6

5 years ago
(In reply to (Away Aug 16-22) David Lawrence [:dkl] from comment #4)
> Flag notifications emails do not contain the comment unless the change was
> done through the Bugzilla web UI. For flags requests created through the
> webservice API, the comment is not included. Admittedly this should be fixed
> upstream but is current behavior.

I'm sure bzexport uploads show a comment though?

Is this a difference between the various APIs?
(In reply to Ed Morley [:edmorley] from comment #6)
> (In reply to (Away Aug 16-22) David Lawrence [:dkl] from comment #4)
> > Flag notifications emails do not contain the comment unless the change was
> > done through the Bugzilla web UI. For flags requests created through the
> > webservice API, the comment is not included. Admittedly this should be fixed
> > upstream but is current behavior.
> 
> I'm sure bzexport uploads show a comment though?
> 
> Is this a difference between the various APIs?

As I remember, bzexport is still using or used to use the BzAPI server (api-dev) which is probably why it had comments in the emails. It used attachment.cgi behind the scenes to create the attachment. But the BzAPI extension on BMO uses the standard Bug.add_attachment which does not show the comment in the email. So it depends on which api server the user has their bzexport extension pointing to. 

dkl

Updated

5 years ago
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 508541
Reporter

Updated

5 years ago
No longer blocks: 1021929
You need to log in before you can comment on or make changes to this bug.