diff options
author | David Lawrence <dkl@mozilla.com> | 2015-01-08 17:56:25 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-01-08 17:56:25 +0100 |
commit | 0b5e63fd4478ca93114cdaabe0b267883b5f54eb (patch) | |
tree | e1506fb555682077ec537d8e2f85f4b2bd49bf15 /extensions/BzAPI | |
parent | 570476d742e61c2fe3d846258d6a73a2764b486f (diff) | |
download | bugzilla-0b5e63fd4478ca93114cdaabe0b267883b5f54eb.tar.gz bugzilla-0b5e63fd4478ca93114cdaabe0b267883b5f54eb.tar.xz |
Bug 1119114: bzapi/configuration returns empty flag_types if no bug or attachment flag types are defined
Diffstat (limited to 'extensions/BzAPI')
-rw-r--r-- | extensions/BzAPI/template/en/default/config.json.tmpl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/extensions/BzAPI/template/en/default/config.json.tmpl b/extensions/BzAPI/template/en/default/config.json.tmpl index 993b34915..340a8e650 100644 --- a/extensions/BzAPI/template/en/default/config.json.tmpl +++ b/extensions/BzAPI/template/en/default/config.json.tmpl @@ -141,14 +141,11 @@ OLDATTACH2NEW = { "id": [% component.id FILTER json %], [% IF show_flags %] "flag_type": [ - [% flag_types = - 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 %] + [% flag_types = component.flag_types(is_active=>1).bug || [] %] + [% flag_types = flag_types.merge(component.flag_types(is_active=>1).attachment || []) %] [% FOREACH flag_type = flag_types %] [% all_visible_flag_types.${flag_type.id} = flag_type %] - [% ',' UNLESS first %][% flag_type.id FILTER json %][% first = 0 %] + [%- ',' UNLESS loop.first %][% flag_type.id FILTER json %] [% END %]], [% END %] "description": "[% component.description FILTER json %]" |