summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-22 06:58:43 +0200
committermkanat%bugzilla.org <>2008-08-22 06:58:43 +0200
commitbfcc230e3bf4b8876816f20911a46505dea0f61a (patch)
treeb33c3adf71b6b555ac3c574e24551d43dff8e4a8 /Bugzilla/Bug.pm
parentfed8e66bbd70a815fee8c7f16936dd77651bd31f (diff)
downloadbugzilla-bfcc230e3bf4b8876816f20911a46505dea0f61a.tar.gz
bugzilla-bfcc230e3bf4b8876816f20911a46505dea0f61a.tar.xz
Bug 287334: Ability to add custom "Bug ID" fields
Patch By Elliotte Martin <elliotte_martin@yahoo.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index b367954e6..d82b6f6e6 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -150,6 +150,9 @@ sub VALIDATORS {
elsif ($field->type == FIELD_TYPE_FREETEXT) {
$validator = \&_check_freetext_field;
}
+ elsif ($field->type == FIELD_TYPE_BUG_ID) {
+ $validator = \&_check_bugid_field;
+ }
else {
$validator = \&_check_default_field;
}
@@ -1643,6 +1646,12 @@ sub _check_select_field {
return $value;
}
+sub _check_bugid_field {
+ my ($invocant, $value, $field) = @_;
+ return undef if !$value;
+ return $invocant->check($value, $field)->id;
+}
+
#####################################################################
# Class Accessors
#####################################################################