Closed
Bug 1100476
Opened 10 years ago
Closed 9 years ago
Add microdata to flag request bugmail so Gmail can display a "View bug" button
Categories
(Bugzilla :: Email Notifications, defect)
Bugzilla
Email Notifications
Tracking
()
RESOLVED
FIXED
Bugzilla 6.0
People
(Reporter: emorley, Assigned: emorley)
References
(Depends on 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
139.94 KB,
image/jpeg
|
Details | |
2.30 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Github have recently added support for action buttons on the email notifications: https://github.com/blog/1891-view-issue-pull-request-buttons-for-gmail It would be great if we could do the same for review emails (eg takes you straight to the mozreview page), and possibly also "view bug". Docs: https://developers.google.com/gmail/markup/getting-started How to register: https://developers.google.com/gmail/markup/registering-with-google
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Example from Github PR email (placed at the end of the HTML body): <div itemscope itemtype="http://schema.org/EmailMessage"> <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction"> <link itemprop="url" href="https://github.com/mozilla/treeherder-service/pull/289"></link> <meta itemprop="name" content="View Pull Request"></meta> </div> <meta itemprop="description" content="View this Pull Request on GitHub"></meta> </div>
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1102364 is handling standard bug change notifications. For this bug ("{review,feedback,...} requested") we can do this upstream too (I initially thought upstream Bugzilla didn't have review/flag support, but it does - I'd misunderstood what the BMO Review extension did). However for the flag request emails, we currently don't have HTML versions of them afaict, so we'll need to add support for that as well. The Microdata added at the end of the markup will need to be something like: <div itemscope itemtype="http://schema.org/EmailMessage"> <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction"> <link itemprop="url" href="attachment.cgi?id=8528626&action=edit"/> <meta itemprop="name" content="View request"/> </div> <meta itemprop="description" content="Bugzilla request notification"/> </div> However we'll want to figure out whether "attachment.cgi?id=8528626&action=edit" makes sense, or if for things like MozReview requests, "attachment.cgi?id=8528626" might be better. However that may be easier to do in BMO by overriding what attachment.cgi does, rather than what we link to. Either way, we can just link to &action=edit for now, since that's all the current request bugmail does in the body of the message anyway.
Assignee: nobody → email-notifications
Component: Extensions: Review → Email Notifications
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: Add support for gmail action buttons for reviewing a patch → Add Microdata to flag request bugmail so Gmail can display a "View request" button
Version: Production → unspecified
Assignee | ||
Updated•9 years ago
|
Assignee: email-notifications → emorley
Assignee | ||
Comment 4•9 years ago
|
||
Now that we have HTML flagmail, this adds the flagmail equivalent of the normal bugmail microdata added by bug 1102364.
Attachment #8580384 -
Flags: review?(dkl)
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Comment 5•9 years ago
|
||
Comment on attachment 8580384 [details] [diff] [review] Add microdata to flag request bugmail Review of attachment 8580384 [details] [diff] [review]: ----------------------------------------------------------------- Bit-rot so needs to be updated for latest trunk code. Also you need to update it to work with either bug flag requests or attachment flag requests and format the link appropriately. dkl
Attachment #8580384 -
Flags: review?(dkl) → review-
Assignee | ||
Comment 6•9 years ago
|
||
So thinking about this some more, there are actually quite a few different permutations: 1) Attachment flag: a) With a comment (eg new attachment or else old attachment, but a comment included) i) For a patch ii) For a mozreview or github request iii) For some other non-patch file b) No comment (eg added a review flag on an existing attachment) i) For a patch ii) For a mozreview or github request iii) For some other non-patch file 2) Bug flag: a) With a comment (eg needinfo with comment) b) No comment (eg needinfo after previously adding a comment but forgetting to set the needinfo) For the attachment cases, it's not always clear where we'd want to link the button to. eg: for patches should we link to the details page (so people can actually set the r+), the diff, or 'review' (splinter). (In addition, I guess splinter isn't upstream too). Then for mozreview/github pull requests, not only is this not supported upstream, but even if we were to go to the trouble of special-casing and linking to the attachment content (so it would redirect) - some people may prefer to stay on the attachment details page so they can set the r+. Plus the message content when requesting review is often relevant - so if we were to link to the details page, people may have missed the text - since they won't have opened the "review requested" email. Long story short: let's just link to the bug comment number if it exists, or failing that, just the bug itself. It seems like the simplest approach and least likely to miss important content. As an added bonus, using "View bug" as the action name should mean we don't have to re-register another action with GMail - since that was so much fun the first time around..
Assignee | ||
Comment 7•9 years ago
|
||
The implementation here is now identical to that for normal bugmail, for the reasons in comment 6. I had to make one additional change - which was reversing the order of comments, if there were several. Normal bugmail reverses the comment order, whereas currently flagmail did not. To me it makes sense to be consistent - and since we want the anchor value of the oldest comment (ie the one with the lowest comment number) - reversing the order (so they are now new to old) makes this easier.
Attachment #8609365 -
Flags: review?(dkl)
Assignee | ||
Updated•9 years ago
|
Summary: Add Microdata to flag request bugmail so Gmail can display a "View request" button → Add microdata to flag request bugmail so Gmail can display a "View bug" button
Comment 8•9 years ago
|
||
Comment on attachment 8609365 [details] [diff] [review] Add microdata to flag request bugmail Review of attachment 8609365 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8609365 -
Flags: review?(dkl) → review+
Updated•9 years ago
|
Flags: approval?
Updated•9 years ago
|
Attachment #8580384 -
Attachment is obsolete: true
Comment 9•9 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git cd263e8..4d201cd master -> master
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•