Commit 77b3adda authored by Dave Lawrence's avatar Dave Lawrence

Bug 77193 - Add the ability to retire (disable) old versions, components and milestones

r/a=mkanat
parent c75bcea5
...@@ -45,6 +45,7 @@ use constant DB_COLUMNS => qw( ...@@ -45,6 +45,7 @@ use constant DB_COLUMNS => qw(
initialowner initialowner
initialqacontact initialqacontact
description description
isactive
); );
use constant UPDATE_COLUMNS => qw( use constant UPDATE_COLUMNS => qw(
...@@ -52,6 +53,7 @@ use constant UPDATE_COLUMNS => qw( ...@@ -52,6 +53,7 @@ use constant UPDATE_COLUMNS => qw(
initialowner initialowner
initialqacontact initialqacontact
description description
isactive
); );
use constant REQUIRED_FIELD_MAP => { use constant REQUIRED_FIELD_MAP => {
...@@ -66,6 +68,7 @@ use constant VALIDATORS => { ...@@ -66,6 +68,7 @@ use constant VALIDATORS => {
description => \&_check_description, description => \&_check_description,
initial_cc => \&_check_cc_list, initial_cc => \&_check_cc_list,
name => \&_check_name, name => \&_check_name,
isactive => \&Bugzilla::Object::check_boolean,
}; };
use constant VALIDATOR_DEPENDENCIES => { use constant VALIDATOR_DEPENDENCIES => {
...@@ -300,6 +303,7 @@ sub _create_series { ...@@ -300,6 +303,7 @@ sub _create_series {
sub set_name { $_[0]->set('name', $_[1]); } sub set_name { $_[0]->set('name', $_[1]); }
sub set_description { $_[0]->set('description', $_[1]); } sub set_description { $_[0]->set('description', $_[1]); }
sub set_is_active { $_[0]->set('isactive', $_[1]); }
sub set_default_assignee { sub set_default_assignee {
my ($self, $owner) = @_; my ($self, $owner) = @_;
...@@ -416,6 +420,7 @@ sub product { ...@@ -416,6 +420,7 @@ sub product {
sub description { return $_[0]->{'description'}; } sub description { return $_[0]->{'description'}; }
sub product_id { return $_[0]->{'product_id'}; } sub product_id { return $_[0]->{'product_id'}; }
sub is_active { return $_[0]->{'isactive'}; }
############################################## ##############################################
# Implement Bugzilla::Field::ChoiceInterface # # Implement Bugzilla::Field::ChoiceInterface #
...@@ -423,7 +428,6 @@ sub product_id { return $_[0]->{'product_id'}; } ...@@ -423,7 +428,6 @@ sub product_id { return $_[0]->{'product_id'}; }
use constant FIELD_NAME => 'component'; use constant FIELD_NAME => 'component';
use constant is_default => 0; use constant is_default => 0;
use constant is_active => 1;
sub is_set_on_bug { sub is_set_on_bug {
my ($self, $bug) = @_; my ($self, $bug) = @_;
......
...@@ -718,6 +718,8 @@ use constant ABSTRACT_SCHEMA => { ...@@ -718,6 +718,8 @@ use constant ABSTRACT_SCHEMA => {
REFERENCES => {TABLE => 'products', REFERENCES => {TABLE => 'products',
COLUMN => 'id', COLUMN => 'id',
DELETE => 'CASCADE'}}, DELETE => 'CASCADE'}},
isactive => {TYPE => 'BOOLEAN', NOTNULL => 1,
DEFAULT => 'TRUE'},
], ],
INDEXES => [ INDEXES => [
versions_product_id_idx => {FIELDS => [qw(product_id value)], versions_product_id_idx => {FIELDS => [qw(product_id value)],
...@@ -736,6 +738,8 @@ use constant ABSTRACT_SCHEMA => { ...@@ -736,6 +738,8 @@ use constant ABSTRACT_SCHEMA => {
value => {TYPE => 'varchar(20)', NOTNULL => 1}, value => {TYPE => 'varchar(20)', NOTNULL => 1},
sortkey => {TYPE => 'INT2', NOTNULL => 1, sortkey => {TYPE => 'INT2', NOTNULL => 1,
DEFAULT => 0}, DEFAULT => 0},
isactive => {TYPE => 'BOOLEAN', NOTNULL => 1,
DEFAULT => 'TRUE'},
], ],
INDEXES => [ INDEXES => [
milestones_product_id_idx => {FIELDS => [qw(product_id value)], milestones_product_id_idx => {FIELDS => [qw(product_id value)],
...@@ -1264,6 +1268,8 @@ use constant ABSTRACT_SCHEMA => { ...@@ -1264,6 +1268,8 @@ use constant ABSTRACT_SCHEMA => {
COLUMN => 'userid', COLUMN => 'userid',
DELETE => 'SET NULL'}}, DELETE => 'SET NULL'}},
description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
isactive => {TYPE => 'BOOLEAN', NOTNULL => 1,
DEFAULT => 'TRUE'},
], ],
INDEXES => [ INDEXES => [
components_product_id_idx => {FIELDS => [qw(product_id name)], components_product_id_idx => {FIELDS => [qw(product_id name)],
......
...@@ -631,6 +631,9 @@ sub update_table_definitions { ...@@ -631,6 +631,9 @@ sub update_table_definitions {
# 2010-07-18 LpSolit@gmail.com - Bug 119703 # 2010-07-18 LpSolit@gmail.com - Bug 119703
_remove_attachment_isurl(); _remove_attachment_isurl();
# 2009-05-07 ghendricks@novell.com - Bug 77193
_add_isactive_to_product_fields();
################################################################ ################################################################
# New --TABLE-- changes should go *** A B O V E *** this point # # New --TABLE-- changes should go *** A B O V E *** this point #
################################################################ ################################################################
...@@ -3397,6 +3400,26 @@ sub _remove_attachment_isurl { ...@@ -3397,6 +3400,26 @@ sub _remove_attachment_isurl {
} }
} }
sub _add_isactive_to_product_fields {
my $dbh = Bugzilla->dbh;
# If we add the isactive column all values should start off as active
if (!$dbh->bz_column_info('components', 'isactive')) {
$dbh->bz_add_column('components', 'isactive',
{TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
}
if (!$dbh->bz_column_info('versions', 'isactive')) {
$dbh->bz_add_column('versions', 'isactive',
{TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
}
if (!$dbh->bz_column_info('milestones', 'isactive')) {
$dbh->bz_add_column('milestones', 'isactive',
{TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
}
}
sub _migrate_field_visibility_value { sub _migrate_field_visibility_value {
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
......
...@@ -43,6 +43,7 @@ use constant DB_COLUMNS => qw( ...@@ -43,6 +43,7 @@ use constant DB_COLUMNS => qw(
value value
product_id product_id
sortkey sortkey
isactive
); );
use constant REQUIRED_FIELD_MAP => { use constant REQUIRED_FIELD_MAP => {
...@@ -52,12 +53,14 @@ use constant REQUIRED_FIELD_MAP => { ...@@ -52,12 +53,14 @@ use constant REQUIRED_FIELD_MAP => {
use constant UPDATE_COLUMNS => qw( use constant UPDATE_COLUMNS => qw(
value value
sortkey sortkey
isactive
); );
use constant VALIDATORS => { use constant VALIDATORS => {
product => \&_check_product, product => \&_check_product,
sortkey => \&_check_sortkey, sortkey => \&_check_sortkey,
value => \&_check_value, value => \&_check_value,
isactive => \&Bugzilla::Object::check_boolean,
}; };
use constant VALIDATOR_DEPENDENCIES => { use constant VALIDATOR_DEPENDENCIES => {
...@@ -203,8 +206,9 @@ sub _check_product { ...@@ -203,8 +206,9 @@ sub _check_product {
# Methods # Methods
################################ ################################
sub set_name { $_[0]->set('value', $_[1]); } sub set_name { $_[0]->set('value', $_[1]); }
sub set_sortkey { $_[0]->set('sortkey', $_[1]); } sub set_sortkey { $_[0]->set('sortkey', $_[1]); }
sub set_is_active { $_[0]->set('isactive', $_[1]); }
sub bug_count { sub bug_count {
my $self = shift; my $self = shift;
...@@ -226,6 +230,7 @@ sub bug_count { ...@@ -226,6 +230,7 @@ sub bug_count {
sub name { return $_[0]->{'value'}; } sub name { return $_[0]->{'value'}; }
sub product_id { return $_[0]->{'product_id'}; } sub product_id { return $_[0]->{'product_id'}; }
sub sortkey { return $_[0]->{'sortkey'}; } sub sortkey { return $_[0]->{'sortkey'}; }
sub is_active { return $_[0]->{'isactive'}; }
sub product { sub product {
my $self = shift; my $self = shift;
......
...@@ -44,6 +44,7 @@ use constant DB_COLUMNS => qw( ...@@ -44,6 +44,7 @@ use constant DB_COLUMNS => qw(
id id
value value
product_id product_id
isactive
); );
use constant REQUIRED_FIELD_MAP => { use constant REQUIRED_FIELD_MAP => {
...@@ -52,11 +53,13 @@ use constant REQUIRED_FIELD_MAP => { ...@@ -52,11 +53,13 @@ use constant REQUIRED_FIELD_MAP => {
use constant UPDATE_COLUMNS => qw( use constant UPDATE_COLUMNS => qw(
value value
isactive
); );
use constant VALIDATORS => { use constant VALIDATORS => {
product => \&_check_product, product => \&_check_product,
value => \&_check_value, value => \&_check_value,
isactive => \&Bugzilla::Object::check_boolean,
}; };
use constant VALIDATOR_DEPENDENCIES => { use constant VALIDATOR_DEPENDENCIES => {
...@@ -153,6 +156,7 @@ sub remove_from_db { ...@@ -153,6 +156,7 @@ sub remove_from_db {
############################### ###############################
sub product_id { return $_[0]->{'product_id'}; } sub product_id { return $_[0]->{'product_id'}; }
sub is_active { return $_[0]->{'isactive'}; }
sub product { sub product {
my $self = shift; my $self = shift;
...@@ -166,7 +170,8 @@ sub product { ...@@ -166,7 +170,8 @@ sub product {
# Validators # Validators
################################ ################################
sub set_name { $_[0]->set('value', $_[1]); } sub set_name { $_[0]->set('value', $_[1]); }
sub set_is_active { $_[0]->set('isactive', $_[1]); }
sub _check_value { sub _check_value {
my ($invocant, $name, undef, $params) = @_; my ($invocant, $name, undef, $params) = @_;
......
...@@ -1171,11 +1171,11 @@ if ($dotweak && scalar @bugs) { ...@@ -1171,11 +1171,11 @@ if ($dotweak && scalar @bugs) {
# versions for the product (if there is only one product on the list of # versions for the product (if there is only one product on the list of
# products), and a list of components for the product. # products), and a list of components for the product.
if ($one_product) { if ($one_product) {
$vars->{'versions'} = [map($_->name ,@{ $one_product->versions })]; $vars->{'versions'} = [map($_->name, grep($_->is_active, @{ $one_product->versions }))];
$vars->{'components'} = [map($_->name, @{ $one_product->components })]; $vars->{'components'} = [map($_->name, grep($_->is_active, @{ $one_product->components }))];
if (Bugzilla->params->{'usetargetmilestone'}) { if (Bugzilla->params->{'usetargetmilestone'}) {
$vars->{'targetmilestones'} = [map($_->name, $vars->{'targetmilestones'} = [map($_->name, grep($_->is_active,
@{ $one_product->milestones })]; @{ $one_product->milestones }))];
} }
} }
} }
......
...@@ -128,6 +128,7 @@ if ($action eq 'new') { ...@@ -128,6 +128,7 @@ if ($action eq 'new') {
my $default_qa_contact = trim($cgi->param('initialqacontact') || ''); my $default_qa_contact = trim($cgi->param('initialqacontact') || '');
my $description = trim($cgi->param('description') || ''); my $description = trim($cgi->param('description') || '');
my @initial_cc = $cgi->param('initialcc'); my @initial_cc = $cgi->param('initialcc');
my $isactive = $cgi->param('isactive');
my $component = Bugzilla::Component->create({ my $component = Bugzilla::Component->create({
name => $comp_name, name => $comp_name,
...@@ -230,7 +231,8 @@ if ($action eq 'update') { ...@@ -230,7 +231,8 @@ if ($action eq 'update') {
my $default_qa_contact = trim($cgi->param('initialqacontact') || ''); my $default_qa_contact = trim($cgi->param('initialqacontact') || '');
my $description = trim($cgi->param('description') || ''); my $description = trim($cgi->param('description') || '');
my @initial_cc = $cgi->param('initialcc'); my @initial_cc = $cgi->param('initialcc');
my $isactive = $cgi->param('isactive');
my $component = my $component =
Bugzilla::Component->check({ product => $product, name => $comp_old_name }); Bugzilla::Component->check({ product => $product, name => $comp_old_name });
...@@ -239,6 +241,7 @@ if ($action eq 'update') { ...@@ -239,6 +241,7 @@ if ($action eq 'update') {
$component->set_default_assignee($default_assignee); $component->set_default_assignee($default_assignee);
$component->set_default_qa_contact($default_qa_contact); $component->set_default_qa_contact($default_qa_contact);
$component->set_cc_list(\@initial_cc); $component->set_cc_list(\@initial_cc);
$component->set_is_active($isactive);
my $changes = $component->update(); my $changes = $component->update();
$vars->{'message'} = 'component_updated'; $vars->{'message'} = 'component_updated';
......
...@@ -60,6 +60,7 @@ my $sortkey = trim($cgi->param('sortkey') || 0); ...@@ -60,6 +60,7 @@ my $sortkey = trim($cgi->param('sortkey') || 0);
my $action = trim($cgi->param('action') || ''); my $action = trim($cgi->param('action') || '');
my $showbugcounts = (defined $cgi->param('showbugcounts')); my $showbugcounts = (defined $cgi->param('showbugcounts'));
my $token = $cgi->param('token'); my $token = $cgi->param('token');
my $isactive = $cgi->param('isactive');
# #
# product = '' -> Show nice list of products # product = '' -> Show nice list of products
...@@ -115,9 +116,11 @@ if ($action eq 'add') { ...@@ -115,9 +116,11 @@ if ($action eq 'add') {
if ($action eq 'new') { if ($action eq 'new') {
check_token_data($token, 'add_milestone'); check_token_data($token, 'add_milestone');
my $milestone = Bugzilla::Milestone->create({ value => $milestone_name,
product => $product, my $milestone = Bugzilla::Milestone->create({ value => $milestone_name,
sortkey => $sortkey }); product => $product,
sortkey => $sortkey });
delete_token($token); delete_token($token);
$vars->{'message'} = 'milestone_created'; $vars->{'message'} = 'milestone_created';
...@@ -205,6 +208,7 @@ if ($action eq 'update') { ...@@ -205,6 +208,7 @@ if ($action eq 'update') {
$milestone->set_name($milestone_name); $milestone->set_name($milestone_name);
$milestone->set_sortkey($sortkey); $milestone->set_sortkey($sortkey);
$milestone->set_is_active($isactive);
my $changes = $milestone->update(); my $changes = $milestone->update();
# Reloading the product since the default milestone name # Reloading the product since the default milestone name
# could have been changed. # could have been changed.
......
...@@ -63,6 +63,7 @@ my $version_name = trim($cgi->param('version') || ''); ...@@ -63,6 +63,7 @@ my $version_name = trim($cgi->param('version') || '');
my $action = trim($cgi->param('action') || ''); my $action = trim($cgi->param('action') || '');
my $showbugcounts = (defined $cgi->param('showbugcounts')); my $showbugcounts = (defined $cgi->param('showbugcounts'));
my $token = $cgi->param('token'); my $token = $cgi->param('token');
my $isactive = $cgi->param('isactive');
# #
# product = '' -> Show nice list of products # product = '' -> Show nice list of products
...@@ -204,6 +205,7 @@ if ($action eq 'update') { ...@@ -204,6 +205,7 @@ if ($action eq 'update') {
$dbh->bz_start_transaction(); $dbh->bz_start_transaction();
$version->set_name($version_name); $version->set_name($version_name);
$version->set_is_active($isactive);
my $changes = $version->update(); my $changes = $version->update();
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
......
...@@ -502,7 +502,7 @@ else { ...@@ -502,7 +502,7 @@ else {
# #
# Eventually maybe each product should have a "current version" # Eventually maybe each product should have a "current version"
# parameter. # parameter.
$vars->{'version'} = [map($_->name, @{$product->versions})]; $vars->{'version'} = $product->versions;
my $version_cookie = $cgi->cookie("VERSION-" . $product->name); my $version_cookie = $cgi->cookie("VERSION-" . $product->name);
...@@ -521,7 +521,7 @@ if ( ($cloned_bug_id) && ...@@ -521,7 +521,7 @@ if ( ($cloned_bug_id) &&
# Get list of milestones. # Get list of milestones.
if ( Bugzilla->params->{'usetargetmilestone'} ) { if ( Bugzilla->params->{'usetargetmilestone'} ) {
$vars->{'target_milestone'} = [map($_->name, @{$product->milestones})]; $vars->{'target_milestone'} = $product->milestones;
if (formvalue('target_milestone')) { if (formvalue('target_milestone')) {
$default{'target_milestone'} = formvalue('target_milestone'); $default{'target_milestone'} = formvalue('target_milestone');
} else { } else {
......
...@@ -83,7 +83,7 @@ from '[% product.name FILTER html %]' product ...@@ -83,7 +83,7 @@ from '[% product.name FILTER html %]' product
</tr> </tr>
<tr> <tr>
<TD VALIGN="top">Open for [% terms.bugs %]:</TD> <TD VALIGN="top">Open for [% terms.bugs %]:</TD>
<TD VALIGN="top">[% IF product.is_active %]Yes[% ELSE %]No[% END %]</td> <TD VALIGN="top">[% IF product.is_active && comp.isactive %]Yes[% ELSE %]No[% END %]</td>
</tr> </tr>
<tr> <tr>
<td valign="top">[% terms.Bugs %]:</td> <td valign="top">[% terms.Bugs %]:</td>
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
[% PROCESS "admin/components/edit-common.html.tmpl" %] [% PROCESS "admin/components/edit-common.html.tmpl" %]
<tr> <tr>
<td><label for="isactive">Enabled For [% terms.Bugs %]:</label></td>
<td><input id="isactive" name="isactive" type="checkbox" value="1"
[% 'checked="checked"' IF comp.isactive %]></td>
</tr>
<tr>
<td>[% terms.Bugs %]:</td> <td>[% terms.Bugs %]:</td>
<td> <td>
[% IF comp.bug_count > 0 %] [% IF comp.bug_count > 0 %]
......
...@@ -56,6 +56,11 @@ ...@@ -56,6 +56,11 @@
name => "initialowner" name => "initialowner"
heading => "Default Assignee" heading => "Default Assignee"
}, },
{
name => "isactive"
heading => "Active"
yesno_field => 1
},
] ]
%] %]
......
...@@ -47,7 +47,11 @@ ...@@ -47,7 +47,11 @@
<td><input id="sortkey" size="20" maxlength="20" name="sortkey" value=" <td><input id="sortkey" size="20" maxlength="20" name="sortkey" value="
[%- milestone.sortkey FILTER html %]"></td> [%- milestone.sortkey FILTER html %]"></td>
</tr> </tr>
<tr>
<th><label for="isactive">Enabled For [% terms.Bugs %]:</label></th>
<td><input id="isactive" name="isactive" type="checkbox" value="1"
[% 'checked="checked"' IF milestone.isactive %]></td>
</tr>
</table> </table>
<input type="hidden" name="milestoneold" value="[% milestone.name FILTER html %]"> <input type="hidden" name="milestoneold" value="[% milestone.name FILTER html %]">
......
...@@ -53,6 +53,11 @@ ...@@ -53,6 +53,11 @@
{ {
name => "sortkey" name => "sortkey"
heading => "Sortkey" heading => "Sortkey"
},
{
name => "isactive"
heading => "Active"
yesno_field => 1
} }
] ]
%] %]
......
...@@ -41,7 +41,11 @@ ...@@ -41,7 +41,11 @@
<td><input id="version" size="64" maxlength="64" name="version" value=" <td><input id="version" size="64" maxlength="64" name="version" value="
[%- version.name FILTER html %]"></td> [%- version.name FILTER html %]"></td>
</tr> </tr>
<tr>
<th><label for="isactive">Enabled For [% terms.Bugs %]:</label></th>
<td><input id="isactive" name="isactive" type="checkbox" value="1"
[% 'checked="checked"' IF version.isactive %]></td>
</tr>
</table> </table>
<input type="hidden" name="versionold" value="[% version.name FILTER html %]"> <input type="hidden" name="versionold" value="[% version.name FILTER html %]">
......
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
name => "name" name => "name"
heading => "Edit version..." heading => "Edit version..."
contentlink => edit_contentlink contentlink => edit_contentlink
},
{
name => "isactive"
heading => "Active"
yesno_field => 1
} }
] ]
%] %]
......
...@@ -238,6 +238,7 @@ TUI_hide_default('attachment_text_field'); ...@@ -238,6 +238,7 @@ TUI_hide_default('attachment_text_field');
[% END %] [% END %]
[%- FOREACH c = product.components %] [%- FOREACH c = product.components %]
[% NEXT IF NOT c.is_active %]
<option value="[% c.name FILTER html %]" <option value="[% c.name FILTER html %]"
id="v[% c.id FILTER html %]_component" id="v[% c.id FILTER html %]_component"
[% IF c.name == default.component_ %] [% IF c.name == default.component_ %]
...@@ -288,8 +289,9 @@ TUI_hide_default('attachment_text_field'); ...@@ -288,8 +289,9 @@ TUI_hide_default('attachment_text_field');
<td rowspan="3"> <td rowspan="3">
<select name="version" id="version" size="5"> <select name="version" id="version" size="5">
[%- FOREACH v = version %] [%- FOREACH v = version %]
<option value="[% v FILTER html %]" [% NEXT IF NOT v.is_active %]
[% ' selected="selected"' IF v == default.version %]>[% v FILTER html -%] <option value="[% v.name FILTER html %]"
[% ' selected="selected"' IF v.name == default.version %]>[% v.name FILTER html -%]
</option> </option>
[%- END %] [%- END %]
</select> </select>
...@@ -733,9 +735,10 @@ TUI_hide_default('attachment_text_field'); ...@@ -733,9 +735,10 @@ TUI_hide_default('attachment_text_field');
<select name="[% field.name FILTER html %]" <select name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]"> id="[% field.name FILTER html %]">
[%- FOREACH x = ${field.name} %] [%- FOREACH x = ${field.name} %]
<option value="[% x FILTER html %]" [% NEXT IF NOT x.is_active %]
[% " selected=\"selected\"" IF x == default.${field.name} %]> <option value="[% x.name FILTER html %]"
[% display_value(field.name, x) FILTER html %] [% " selected=\"selected\"" IF x.name == default.${field.name} %]>
[% display_value(field.name, x.name) FILTER html %]
</option> </option>
[% END %] [% END %]
</select> </select>
......
...@@ -1117,6 +1117,7 @@ ...@@ -1117,6 +1117,7 @@
AND bug.choices.${selname}.size > 1 %] AND bug.choices.${selname}.size > 1 %]
<select id="[% selname %]" name="[% selname %]"> <select id="[% selname %]" name="[% selname %]">
[% FOREACH x = bug.choices.${selname} %] [% FOREACH x = bug.choices.${selname} %]
[% NEXT IF NOT x.is_active AND x.name != bug.${selname} %]
<option value="[% x.name FILTER html %]" <option value="[% x.name FILTER html %]"
[% " selected" IF x.name == bug.${selname} %]> [% " selected" IF x.name == bug.${selname} %]>
[%- x.name FILTER html %] [%- x.name FILTER html %]
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
[% legal_values = field.legal_values %] [% legal_values = field.legal_values %]
[% END %] [% END %]
[% FOREACH legal_value = legal_values %] [% FOREACH legal_value = legal_values %]
[% NEXT IF NOT legal_value.is_active AND NOT value.contains(legal_value.name).size %]
<option value="[% legal_value.name FILTER html %]" <option value="[% legal_value.name FILTER html %]"
id="v[% legal_value.id FILTER html %]_ id="v[% legal_value.id FILTER html %]_
[%- field.name FILTER html %]" [%- field.name FILTER html %]"
......
...@@ -234,6 +234,9 @@ ...@@ -234,6 +234,9 @@
<li>Default CC list deleted</li> <li>Default CC list deleted</li>
[% END %] [% END %]
[% END %] [% END %]
[% IF changes.isactive.defined %]
<li>[% comp.is_active ? "Enabled" : "Disabled" %] for [% terms.bugs %]</li>
[% END %]
[% Hook.process('component_updated_fields') %] [% Hook.process('component_updated_fields') %]
</ul> </ul>
[% ELSE %] [% ELSE %]
...@@ -547,6 +550,9 @@ ...@@ -547,6 +550,9 @@
[% IF changes.sortkey.defined %] [% IF changes.sortkey.defined %]
<li>Sortkey updated to <em>[% milestone.sortkey FILTER html %]</em> <li>Sortkey updated to <em>[% milestone.sortkey FILTER html %]</em>
[% END %] [% END %]
[% IF changes.isactive.defined %]
<li>[% milestone.is_active ? "Enabled" : "Disabled" %] for [% terms.bugs %]</li>
[% END %]
</ul> </ul>
[% ELSE %] [% ELSE %]
No changes made to milestone <em>[% milestone.name FILTER html %]</em>. No changes made to milestone <em>[% milestone.name FILTER html %]</em>.
...@@ -831,9 +837,16 @@ ...@@ -831,9 +837,16 @@
[% ELSIF message_tag == "version_updated" %] [% ELSIF message_tag == "version_updated" %]
[% title = "Version Updated" %] [% title = "Version Updated" %]
[% IF changes.size %] [% IF changes.size %]
[% IF changes.value.defined %] Changes to the version <em>[% version.name FILTER html %]</em>
Version renamed to <em>[% version.name FILTER html %]</em>. have been saved:
[% END %] <ul>
[% IF changes.value.defined %]
<li>Version renamed to <em>[% version.name FILTER html %]</em></li>
[% END %]
[% IF changes.isactive.defined %]
<li>[% version.is_active ? "Enabled" : "Disabled" %] for [% terms.bugs %]</li>
[% END %]
</ul>
[% ELSE %] [% ELSE %]
No changes made to version <em>[% version.name FILTER html %]</em>. No changes made to version <em>[% version.name FILTER html %]</em>.
[% END %] [% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment