summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-24 02:36:51 +0200
committermkanat%bugzilla.org <>2007-10-24 02:36:51 +0200
commit16a1c874c190a2726ff8a9e9aadac12a37592023 (patch)
tree9ea33d5c333ada4c0084a2d0e0871055714a37d4 /Bugzilla/Field.pm
parent212433f27ac422f79924d03b5d047236f6cdd308 (diff)
downloadbugzilla-16a1c874c190a2726ff8a9e9aadac12a37592023.tar.gz
bugzilla-16a1c874c190a2726ff8a9e9aadac12a37592023.tar.xz
Bug 357324: Date/Time Custom Fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Field.pm')
-rw-r--r--Bugzilla/Field.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index 34a1818de..5ad5e51d3 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -127,6 +127,7 @@ use constant SQL_DEFINITIONS => {
FIELD_TYPE_SINGLE_SELECT, { TYPE => 'varchar(64)', NOTNULL => 1,
DEFAULT => "'---'" },
FIELD_TYPE_TEXTAREA, { TYPE => 'MEDIUMTEXT' },
+ FIELD_TYPE_DATETIME, { TYPE => 'DATETIME' },
};
# Field definitions for the fields that ship with Bugzilla.
@@ -255,7 +256,7 @@ sub _check_type {
my $saved_type = $type;
# The constant here should be updated every time a new,
# higher field type is added.
- (detaint_natural($type) && $type <= FIELD_TYPE_TEXTAREA)
+ (detaint_natural($type) && $type <= FIELD_TYPE_DATETIME)
|| ThrowCodeError('invalid_customfield_type', { type => $saved_type });
return $type;
}