From: jocuri%softhome.net <> Date: Wed, 3 Nov 2004 06:59:23 +0000 (+0000) Subject: Patch for bug 212017: Should be able to change a bug if it has a flag requested that... X-Git-Tag: bugzilla-2.18~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0803661d1a815ad51904d14904fc54d2e3b73e64;p=thirdparty%2Fbugzilla.git Patch for bug 212017: Should be able to change a bug if it has a flag requested that is no longer requestable; patch by Frédéric Buclin ; r=myk, vladd, a=myk. --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 7254be1175..a246394ba5 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -166,7 +166,9 @@ sub validate { { id => $id, status => $status }); # Make sure the user didn't request the flag unless it's requestable. - if ($status eq '?' && !$flag->{type}->{is_requestable}) { + # If the flag was requested before it became unrequestable, leave it as is. + if ($status eq '?' && $flag->{status} ne '?' && + !$flag->{type}->{is_requestable}) { ThrowCodeError("flag_status_invalid", { id => $id, status => $status }); } diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 1b99bfb6d5..cb7ff0d487 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -100,7 +100,7 @@ [% IF type.is_active %] - [% IF type.is_requestable %] + [% IF type.is_requestable || flag.status == "?" %] [% END %] [% ELSE %]