Commit 9ca7310c authored by David Lawrence's avatar David Lawrence

Bug 1082882: custom date field not recognized as date type in advanced search

r=glob,a=glob
parent 959d0d72
......@@ -327,7 +327,9 @@ use constant OPERATOR_FIELD_OVERRIDE => {
# These are fields where special action is taken depending on the
# *value* passed in to the chart, sometimes.
use constant SPECIAL_PARSING => {
# This is a sub because custom fields are dynamic
sub SPECIAL_PARSING {
my $map = {
# Pronoun Fields (Ones that can accept %user%, etc.)
assigned_to => \&_contact_pronoun,
cc => \&_contact_pronoun,
......@@ -341,6 +343,13 @@ use constant SPECIAL_PARSING => {
creation_ts => \&_timestamp_translate,
deadline => \&_timestamp_translate,
delta_ts => \&_timestamp_translate,
};
foreach my $field (Bugzilla->active_custom_fields) {
if ($field->type == FIELD_TYPE_DATETIME) {
$map->{$field->name} = \&_timestamp_translate;
}
}
return $map;
};
# Information about fields that represent "users", used by _user_nonchanged.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment