From fe77847fd79f1e2c33754e0960138ca5cba1ca51 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 4 Feb 2015 16:01:01 +0000 Subject: Bug 1124255: Need a way to find only active versions and target milestones using the API --- .../BzAPI/template/en/default/config.json.tmpl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'extensions/BzAPI') diff --git a/extensions/BzAPI/template/en/default/config.json.tmpl b/extensions/BzAPI/template/en/default/config.json.tmpl index 340a8e650..a00245ddf 100644 --- a/extensions/BzAPI/template/en/default/config.json.tmpl +++ b/extensions/BzAPI/template/en/default/config.json.tmpl @@ -148,7 +148,8 @@ OLDATTACH2NEW = { [%- ',' UNLESS loop.first %][% flag_type.id FILTER json %] [% END %]], [% END %] - "description": "[% component.description FILTER json %]" + "description": "[% component.description FILTER json %]", + "is_active": [% component.is_active ? "true" : "false" %] } [% ',' UNLESS loop.last() %] [% END %] }, @@ -157,6 +158,15 @@ OLDATTACH2NEW = { "[% version.name FILTER json %]"[% ',' UNLESS loop.last() %] [% END %] ], + "version_detail": [ + [% FOREACH version = product.versions %] + { + "id": [% version.id FILTER json %], + "name": "[% version.name FILTER json %]", + "is_active": [% version.is_active ? "true" : "false" %] + }[% ',' UNLESS loop.last() %] + [% END %] + ], [% IF Param('usetargetmilestone') %] "default_target_milestone": "[% product.defaultmilestone FILTER json %]", @@ -165,6 +175,16 @@ OLDATTACH2NEW = { "[% milestone.name FILTER json %]"[% ',' UNLESS loop.last() %] [% END %] ], + "target_milestone_detail": [ + [% FOREACH milestone = product.milestones %] + { + "id": [% milestone.id FILTER json %], + "name": "[% milestone.name FILTER json %]", + "sortkey": [% milestone.sortkey FILTER json %], + "is_active": [% milestone.is_active ? "true" : "false" %] + }[% ',' UNLESS loop.last() %] + [% END %] + ], [% END %] "group": [ -- cgit v1.2.3-24-g4f1b