diff options
Diffstat (limited to 'extensions/BzAPI/template/en')
-rw-r--r-- | extensions/BzAPI/template/en/default/config.json.tmpl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/extensions/BzAPI/template/en/default/config.json.tmpl b/extensions/BzAPI/template/en/default/config.json.tmpl index f83dee5fb..d567c6c55 100644 --- a/extensions/BzAPI/template/en/default/config.json.tmpl +++ b/extensions/BzAPI/template/en/default/config.json.tmpl @@ -127,7 +127,7 @@ OLDATTACH2NEW = { [% FOREACH cl IN classifications %] [% cl_name_for.${cl.id} = cl.name %] "[% cl.name FILTER json %]": { - "id": [% cl.id FILTER json %], + "id": [% cl.id %], "description": "[% cl.description FILTER json %]", "products": [ [% FOREACH product IN cl.products %] @@ -142,7 +142,7 @@ OLDATTACH2NEW = { "product": { [% FOREACH product = products %] "[% product.name FILTER json %]": { - "id": [% product.id FILTER json %], + "id": [% product.id %], "description": "[% product.description FILTER json %]", "is_active": [% product.isactive ? "true" : "false" %], "is_permitting_unconfirmed": [% product.allows_unconfirmed ? "true" : "false" %], @@ -152,16 +152,15 @@ OLDATTACH2NEW = { "component": { [% FOREACH component = product.components %] "[% component.name FILTER json %]": { - "id": [% component.id FILTER json %], + "id": [% component.id %], [% IF show_flags %] "flag_type": [ [% flag_types = - component.flag_types.bug.merge(component.flag_types.attachment) %] + component.flag_types(is_active=>1).bug.merge(component.flag_types(is_active=>1).attachment) %] [%-# "first" flag used to get commas right; can't use loop.last() in case # last flag is inactive %] [% first = 1 %] [% FOREACH flag_type = flag_types %] - [% NEXT UNLESS flag_type.is_active %] [% all_visible_flag_types.${flag_type.id} = flag_type %] [% ',' UNLESS first %][% flag_type.id FILTER json %][% first = 0 %] [% END %]], @@ -187,7 +186,7 @@ OLDATTACH2NEW = { "group": [ [% FOREACH group = product.groups_valid %] - [% group.id FILTER json %][% ',' UNLESS loop.last() %] + [% group.id %][% ',' UNLESS loop.last() %] [% END %] ] }[% ',' UNLESS loop.last() %] @@ -196,7 +195,7 @@ OLDATTACH2NEW = { "group": { [% FOREACH group = product.groups_valid %] - "[% group.id FILTER json %]": { + "[% group.id %]": { "name": "[% group.name FILTER json %]", "description": "[% group.description FILTER json %]", "is_accepting_bugs": [% group.is_bug_group ? 'true' : 'false' %], @@ -208,15 +207,15 @@ OLDATTACH2NEW = { [% IF show_flags %] "flag_type": { [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] - "[%+ flag_type.id FILTER json %]": { + "[%+ flag_type.id %]": { "name": "[% flag_type.name FILTER json %]", "description": "[% flag_type.description FILTER json %]", [% IF user.in_group("editcomponents") %] [% IF flag_type.request_group_id %] - "request_group": [% flag_type.request_group_id FILTER json %], + "request_group": [% flag_type.request_group_id %], [% END %] [% IF flag_type.grant_group_id %] - "grant_group": [% flag_type.grant_group_id FILTER json %], + "grant_group": [% flag_type.grant_group_id %], [% END %] [% END %] "is_for_bugs": [% flag_type.target_type == "bug" ? 'true' : 'false' %], @@ -310,7 +309,7 @@ OLDATTACH2NEW = { [% IF newname.match("^cf_") %] "is_on_bug_entry": [% item.enter_bug ? 'true' : 'false' %], [% END %] - "type": [% item.type || type_id_for.$newname || 0 FILTER json %] + "type": [% item.type || type_id_for.$newname || 0 %] }[% ',' UNLESS loop.last() %] [% END %] } |