diff options
author | lpsolit%gmail.com <> | 2008-11-20 02:30:27 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-11-20 02:30:27 +0100 |
commit | 864ee35126ff8053ee46d559f9f4dd53dd871ffd (patch) | |
tree | e32b4cee250b9a7a853c8d45af0743c158347505 | |
parent | d66d351c88c9dded446cc1b3546d47a0f12b6b87 (diff) | |
download | bugzilla-864ee35126ff8053ee46d559f9f4dd53dd871ffd.tar.gz bugzilla-864ee35126ff8053ee46d559f9f4dd53dd871ffd.tar.xz |
Bug 465606: If a user doesn't have privs to change the target milestone, it gets set back to default - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r-- | Bugzilla/Bug.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index d57c0a802..25c2146ef 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1953,13 +1953,13 @@ sub set_product { # just die if any of these are invalid. $self->set_component($comp_name); $self->set_version($vers_name); - if ($self->check_can_change_field('target_milestone', 0, 1)) { - $self->set_target_milestone($tm_name); - } - else { + if ($product_changed && !$self->check_can_change_field('target_milestone', 0, 1)) { # Have to set this directly to bypass the validators. $self->{target_milestone} = $product->default_milestone; } + else { + $self->set_target_milestone($tm_name); + } } if ($product_changed) { |