summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI/template/en/default
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-01-08 17:56:25 +0100
committerDavid Lawrence <dkl@mozilla.com>2015-01-08 17:56:25 +0100
commit0b5e63fd4478ca93114cdaabe0b267883b5f54eb (patch)
treee1506fb555682077ec537d8e2f85f4b2bd49bf15 /extensions/BzAPI/template/en/default
parent570476d742e61c2fe3d846258d6a73a2764b486f (diff)
downloadbugzilla-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/template/en/default')
-rw-r--r--extensions/BzAPI/template/en/default/config.json.tmpl9
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 %]"