#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
HasNoAttribute => [ 'HASATTRIBUTE', 0 ],
);
+# Lower Case version of FIELDS, for case insensitivity
+our %LOWER_CASE_FIELDS = map { ( lc($_) => $_ ) } (keys %FIELD_METADATA);
+
our %SEARCHABLE_SUBFIELDS = (
User => [qw(
EmailAddress Name RealName Nickname Organization Address1 Address2
my $class = "RT::" . $meta->[1];
my $o = $class->new( $sb->CurrentUser );
$o->Load($value);
- $value = $o->Id;
+ $value = $o->Id || 0;
}
$sb->_SQLLimit(
FIELD => $field,
my $is_local = 1;
if ( $is_null ) {
- $op = ($op =~ /^(=|IS)$/)? 'IS': 'IS NOT';
+ $op = ($op =~ /^(=|IS)$/i)? 'IS': 'IS NOT';
}
elsif ( $value =~ /\D/ ) {
$is_local = 0;
my $groups = $self->_RoleGroupsJoin( Type => $type, Class => $class, New => !$type );
$self->_OpenParen;
- if ( $op =~ /^IS(?: NOT)?$/ ) {
+ if ( $op =~ /^IS(?: NOT)?$/i ) {
# is [not] empty case
my $group_members = $self->_GroupMembersJoin( GroupsAlias => $groups );
Takes a paramhash with the fields OPERATOR and VALUE.
OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s priority against
+VALUE is a value to match the ticket's priority against
=cut
Takes a paramhash with the fields OPERATOR and VALUE.
OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s initial priority against
+VALUE is a value to match the ticket's initial priority against
=cut
Takes a paramhash with the fields OPERATOR and VALUE.
OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s final priority against
+VALUE is a value to match the ticket's final priority against
=cut
Takes a paramhash with the fields OPERATOR, TYPE and VALUE.
OPERATOR is one of =, LIKE, NOT LIKE or !=.
- VALUE is a value to match the ticket\'s watcher email addresses against
+ VALUE is a value to match the ticket's watcher email addresses against
TYPE is the sort of watchers you want to match against. Leave it undef if you want to search all of them