Closed Bug 1283233 Opened 8 years ago Closed 8 years ago

Add JSON link to bug nav bar

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: emceeaich, Assigned: dkl)

Details

Attachments

(2 files)

Nav bar at bottom of bug has link to XML version of bug, should also have link to JSON version of bug.
(In reply to Emma Humphries β˜•οΈ  [:emceeaich] (UTC-8) NEEDINFO? me from comment #0)
> Created attachment 8766466 [details]
> Screen Shot 2016-06-29 at 11.10.57 AM.png
> 
> Nav bar at bottom of bug has link to XML version of bug, should also have
> link to JSON version of bug.

So basically a convenient link to https://bugzilla.mozilla.org/rest/bug/<bugid>?

dkl
(In reply to David Lawrence [:dkl] from comment #1)
 
> So basically a convenient link to
> https://bugzilla.mozilla.org/rest/bug/<bugid>?

Yes!
(In reply to Emma Humphries β˜•οΈ  [:emceeaich] (UTC-8) NEEDINFO? me from comment #2)
> (In reply to David Lawrence [:dkl] from comment #1)
>  
> > So basically a convenient link to
> > https://bugzilla.mozilla.org/rest/bug/<bugid>?
> 
> Yes!

One caveat is it will not work for private bugs as the API key must be passed and I do not want to include that automatically in the HTML source. If that is acceptable we can move on this plan. Otherwise we may have to create a show.json.tmpl similar to the current show.xml.tmpl.

dkl
In that case I'd probably not link to the JSON representation in the case of private bugs.
Attached patch 1283233_1.patch β€” β€” Splinter Review
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #8766543 - Flags: review?(dylan)
Comment on attachment 8766543 [details] [diff] [review]
1283233_1.patch

Review of attachment 8766543 [details] [diff] [review]:
-----------------------------------------------------------------

Not knowing the details of the templating system, I can't vouch for correctness, but this is what I was looking for in the bug.
Comment on attachment 8766543 [details] [diff] [review]
1283233_1.patch

Review of attachment 8766543 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan

::: extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
@@ +118,4 @@
>    [% IF user.is_timetracker %]
>      BUGZILLA.remaining_time = [% bug.remaining_time FILTER js %]; // holds the original value
>    [% END %]
> +  BUGZILLA.bug_secure = [% bug.groups_in.size ? '1' : '0' %];

nit: probably more idomatic to use true and false in javascript.
Attachment #8766543 - Flags: review?(dylan) → review+
To https://github.com/mozilla-bteam/bmo.git
   8b6c602..7c42dc6  master -> master
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment