From: mkanat%bugzilla.org <> Date: Thu, 3 Jul 2008 00:14:19 +0000 (+0000) Subject: Bug 442821: The workflow editor allows closed statuses for new bugs X-Git-Tag: bugzilla-3.2rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6624c2ef911057a4c13391db23b917c13e99b57;p=thirdparty%2Fbugzilla.git Bug 442821: The workflow editor allows closed statuses for new bugs Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/editworkflow.cgi b/editworkflow.cgi index eddf845f22..7e51798fc2 100644 --- a/editworkflow.cgi +++ b/editworkflow.cgi @@ -87,7 +87,7 @@ elsif ($action eq 'update') { # Part 1: Initial bug statuses. foreach my $new (@$statuses) { - if ($cgi->param('w_0_' . $new->id)) { + if ($new->is_open && $cgi->param('w_0_' . $new->id)) { $sth_insert->execute(undef, $new->id) unless defined $workflow->{0}->{$new->id}; } diff --git a/template/en/default/admin/workflow/edit.html.tmpl b/template/en/default/admin/workflow/edit.html.tmpl index 5ae2cef2a8..516d184b92 100644 --- a/template/en/default/admin/workflow/edit.html.tmpl +++ b/template/en/default/admin/workflow/edit.html.tmpl @@ -67,7 +67,7 @@ [% FOREACH new_status = statuses %] - [% IF status.id != new_status.id %] + [% IF status.id != new_status.id && (status.id || new_status.is_open) %] [% checked = workflow.${status.id}.${new_status.id}.defined ? 1 : 0 %] [% mandatory = (status.id && new_status.name == Param("duplicate_or_move_bug_status")) ? 1 : 0 %]