diff options
author | mkanat%bugzilla.org <> | 2009-10-24 05:28:13 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-10-24 05:28:13 +0000 |
commit | bb7585e3e91f156493eb14d4f052e169bdf0207f (patch) | |
tree | 5734a2f86c9fd0efc54a50566d47ac93f54d38d4 /Bugzilla | |
parent | 99328846cf347d5fe978d7d674617dd200472d51 (diff) | |
download | bugs-bb7585e3e91f156493eb14d4f052e169bdf0207f.tar bugs-bb7585e3e91f156493eb14d4f052e169bdf0207f.tar.gz bugs-bb7585e3e91f156493eb14d4f052e169bdf0207f.tar.bz2 bugs-bb7585e3e91f156493eb14d4f052e169bdf0207f.tar.xz bugs-bb7585e3e91f156493eb14d4f052e169bdf0207f.zip |
Bug 522620: Make Bugzilla::Bug->create case-insensitive for version and target_milestone values
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Bug.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 5a7863559..528c6544c 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -37,8 +37,10 @@ use Bugzilla::Flag; use Bugzilla::FlagType; use Bugzilla::Hook; use Bugzilla::Keyword; +use Bugzilla::Milestone; use Bugzilla::User; use Bugzilla::Util; +use Bugzilla::Version; use Bugzilla::Error; use Bugzilla::Product; use Bugzilla::Component; @@ -1657,9 +1659,9 @@ sub _check_target_milestone { $target = trim($target); $target = $product->default_milestone if !defined $target; - check_field('target_milestone', $target, - [map($_->name, @{$product->milestones})]); - return $target; + my $object = Bugzilla::Milestone->check( + { product => $product, name => $target }); + return $object->name; } sub _check_time { @@ -1681,8 +1683,9 @@ sub _check_version { my ($invocant, $version, $product) = @_; $version = trim($version); ($product = $invocant->product_obj) if ref $invocant; - check_field('version', $version, [map($_->name, @{$product->versions})]); - return $version; + my $object = + Bugzilla::Version->check({ product => $product, name => $version }); + return $object->name; } sub _check_work_time { |