Closed Bug 535451 Opened 16 years ago Closed 15 years ago

Put up new config.json.tmpl template on b.m.o. and bugzilla-stage-tip

Categories

(bugzilla.mozilla.org :: General, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Assigned: justdave)

Details

Attachments

(1 file, 1 obsolete file)

Attached file New config.json.tmpl (obsolete) —
The format of the JSON output from the BzAPI's /configuration call needs to change to make group numeric IDs the primary identifier for groups, rather than group names. (Both are unique.) This is because there are occasions where an API user may have a number rather than a name, because the names are confidential unless you are a member of the group. This change is most easily made in the config.json.tmpl template which backs the API. Please could the attached version be dropped in on top of the existing one on both b.m.o. and bugzilla-stage-tip? Thank you :-) Gerv
justdave: ping? Gerv
justdave: ping again? This should be just dropping a file into place... Gerv
Just for posterity, this results in a patch that looks like this: === modified file 'template/en/default/config.json.tmpl' --- template/en/default/config.json.tmpl 2009-11-10 17:34:45 +0000 +++ template/en/default/config.json.tmpl 2010-04-23 16:11:22 +0000 @@ -175,7 +175,7 @@ "group": [ [% FOREACH group = product.groups_valid %] - "[% group.name FILTER json %]"[% ',' UNLESS loop.last() %] + [% group.id %][% ',' UNLESS loop.last() %] [% END %] ] }[% ',' UNLESS loop.last() %] @@ -184,8 +184,8 @@ "group": { [% FOREACH group = product.groups_valid %] - "[% group.name FILTER json %]": { - "id": [% group.id %], + "[% group.id %]": { + "name": "[% group.name FILTER json %]", "description": "[% group.description FILTER json %]", "is_accepting_bugs": [% group.is_bug_group %], "is_active": [% group.is_active %] @@ -199,8 +199,8 @@ "name": "[% flag_type.name FILTER json %]", "description": "[% flag_type.description FILTER json %]", [% IF user.in_group("editcomponents") %] - "request_group": "[% flag_type.request_group.name FILTER json %]", - "grant_group": "[% flag_type.grant_group.name FILTER json %]", + "request_group": [% flag_type.request_group.id %], + "grant_group": [% flag_type.grant_group.id %], [% END %] "is_for_bugs": [% flag_type.target_type == "bug" ? 1 : 0 %], "is_requestable": [% flag_type.is_requestable %],
Axel: I know you use the /configuration call. Heads up... Gerv
modified template/en/default/config.json.tmpl Committed revision 6775.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [still waiting for bmo deployment]
This is now live on bugzilla-stage-tip, it'll be live on production when I clear the whiteboard (probably in the next half hour or so, I have a few more patches to commit yet)
deployed to production
Whiteboard: [still waiting for bmo deployment]
Here's the current version. It's here so I can link to it from the installation instructions, but also, dave, can you check this is what's on b.m.o.? Gerv
Attachment #418061 - Attachment is obsolete: true
Attachment #475044 - Flags: feedback?(justdave)
Attachment #475044 - Attachment mime type: application/octet-stream → text/plain
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #8) > dave, can you check this is what's on b.m.o.? It's all in bzr... You can check for yourself. :)
Good point. <checks> Yes, it is. :-) Gerv
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Attachment #475044 - Flags: feedback?(justdave)
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: