]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 442821: The workflow editor allows closed statuses for new bugs
authormkanat%bugzilla.org <>
Thu, 3 Jul 2008 00:14:19 +0000 (00:14 +0000)
committermkanat%bugzilla.org <>
Thu, 3 Jul 2008 00:14:19 +0000 (00:14 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit

editworkflow.cgi
template/en/default/admin/workflow/edit.html.tmpl

index eddf845f22438bf595a1f1d5a508543a27359ad1..7e51798fc26e8f4c9563de088956e7c6721d07c4 100644 (file)
@@ -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};
         }
index 5ae2cef2a892af9981fd1f73cc90fe87fcfdf877..516d184b9275f9b24be84d9f86d747505eebc4e2 100644 (file)
@@ -67,7 +67,7 @@
       </th>
 
       [% 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 %]
           <td align="center" class="checkbox-cell[% " checked" IF checked || mandatory %]"