From 0e52c06f2069cb5413abce39d6249bac73f045c8 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 11 Oct 2013 17:44:25 -0400 Subject: Bug 880829 - Migrate current custom field based tracking flags to the new Tracking Flags extension tables r=glob --- template/en/default/bug/create/create.html.tmpl | 83 ++++-------------------- template/en/default/bug/edit.html.tmpl | 2 +- template/en/default/bug/show-multiple.html.tmpl | 4 +- template/en/default/bug/show.xml.tmpl | 1 - template/en/default/list/edit-multiple.html.tmpl | 1 - 5 files changed, 14 insertions(+), 77 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 9deabac26..b357b3eb0 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -635,7 +635,7 @@ TUI_hide_default('attachment_text_field'); [%# non-tracking flags custom fields %] -[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>1) %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product) %] [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT UNLESS field.enter_bug %] [%# crash-signature gets custom handling %] @@ -673,18 +673,6 @@ TUI_hide_default('attachment_text_field'); [% END %] -[% old_tracking_flags = [] %] -[% old_project_flags = [] %] -[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>2) %] - [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] - [% NEXT UNLESS field.enter_bug %] - [% IF cf_is_project_flag(field.name) %] - [% old_project_flags.push(field) %] - [% ELSE %] - [% old_tracking_flags.push(field) %] - [% END %] -[% END %] - [% display_flags = 0 %] [% any_flags_requesteeble = 0 %] [% FOREACH flag_type = product.flag_types.bug %] @@ -693,7 +681,7 @@ TUI_hide_default('attachment_text_field'); [% LAST IF display_flags && any_flags_requesteeable %] [% END %] -[% IF old_project_flags.size || old_tracking_flags.size || display_flags %] +[% IF tracking_flags.size || display_flags %] Flags: @@ -708,65 +696,18 @@ TUI_hide_default('attachment_text_field');
Set [% terms.bug %] flags - - - - [% IF old_tracking_flags.size %] - - [% END %] - [% IF old_project_flags.size %] - - +
- - - - - [% FOREACH field = old_tracking_flags %] - [% SET value = ${field.name}.defined ? ${field.name} : "" %] - - [% INCLUDE bug/field.html.tmpl - bug = default - field = field - value = value - editable = 1 - value_span = 3 - %] - - [% END %] - [% Hook.process('tracking_flags_end') %] -
Tracking Flags:
-
- - - - - [% FOREACH field = old_project_flags %] - [% SET value = ${field.name}.defined ? ${field.name} : "" %] - - [% INCLUDE bug/field.html.tmpl - bug = default - field = field - value = value - editable = 1 - value_span = 3 - %] - - [% END %] - [% Hook.process('project_flags_end') %] -
Project Flags:
-
- [% END %] - [% IF display_flags %] - - [% END %] + [% Hook.process('bug_flags') %] + [% IF display_flags %] + + [% END %] - [% Hook.process('bug_flags_end') %]
- [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug - any_flags_requesteeble = any_flags_requesteeble - flag_table_id = "bug_flags" - %] - + [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug + any_flags_requesteeble = any_flags_requesteeble + flag_table_id = "bug_flags" + %] +
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 8c2d09872..fc0e41fe2 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -961,7 +961,7 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] [% USE Bugzilla %] - [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>1) %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj) %] [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT IF NOT user.id AND field.value == "---" %] [% Hook.process('custom_field', 'bug/edit.html.tmpl') %] diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 207b3ed86..cfd0d8e20 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -191,9 +191,7 @@ [% USE Bugzilla %] [% field_counter = 0 %] - [% FOREACH field = Bugzilla.active_custom_fields %] - [% NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component) %] - [% NEXT IF cf_flag_disabled(field.name, bug) %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,bug_id=>bug.id) %] [% field_counter = field_counter + 1 %] [%# Odd-numbered fields get an opening %] [% '' IF field_counter % 2 %] diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index cb323d229..c0f32d69e 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -144,7 +144,6 @@ [% ELSIF field == "see_also" %] [% val = val.name %] [% END %] - [% NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component) %] <[% field %][% IF name != '' %] name="[% name FILTER xml %]"[% END -%]> [%- val FILTER xml %] [% END %] diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 9ff95aad5..8f94105a7 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -284,7 +284,6 @@ [%# Show all legal values and all fields, ignoring visibility controls. %] [% bug = default.defined ? default : 0 %] [% FOREACH field = Bugzilla.active_custom_fields %] - [% NEXT IF cf_hidden_in_product(field.name, one_product, components) %] [% PROCESS bug/field.html.tmpl bug = default value = dontchange -- cgit v1.2.3-24-g4f1b