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)
bugzilla.mozilla.org
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: gerv, Assigned: justdave)
Details
Attachments
(1 file, 1 obsolete file)
10.63 KB,
text/plain
|
Details |
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
Reporter | ||
Comment 1•15 years ago
|
||
justdave: ping?
Gerv
Reporter | ||
Comment 2•15 years ago
|
||
justdave: ping again? This should be just dropping a file into place...
Gerv
Assignee | ||
Comment 3•15 years ago
|
||
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 %],
Reporter | ||
Comment 4•15 years ago
|
||
Axel: I know you use the /configuration call. Heads up...
Gerv
Assignee | ||
Comment 5•15 years ago
|
||
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]
Assignee | ||
Comment 6•15 years ago
|
||
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)
Assignee | ||
Comment 7•15 years ago
|
||
deployed to production
Whiteboard: [still waiting for bmo deployment]
Reporter | ||
Comment 8•15 years ago
|
||
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)
Reporter | ||
Updated•15 years ago
|
Attachment #475044 -
Attachment mime type: application/octet-stream → text/plain
Reporter | ||
Updated•15 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 9•15 years ago
|
||
(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. :)
Reporter | ||
Comment 10•15 years ago
|
||
Good point.
<checks>
Yes, it is. :-)
Gerv
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•14 years ago
|
Attachment #475044 -
Flags: feedback?(justdave)
Updated•14 years ago
|
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.
Description
•