Question about LimitCustomField

Hi,

I have a CustomField of type SelectSingle called “Product”.

I want to get a list of tickets in a queue for certain products.

If I do this:

$tickets->LimitCustomField(VALUE => “Product 1” , CUSTOMFIELD => $cfid);
$tickets->LimitCustomField(VALUE => “Product 2” , CUSTOMFIELD => $cfid);

it seems that it attempts to get all the tickets that have BOTH “Product
1” AND “Product 2” as values for the Custom Field “Product”.

How is this possible if the CF is a SelectSingle type? Any ticket can
only have one value.

Am I missing something?

I’m using RT 3.0.6 , mysql 4.0, apache 2.0.43 and FastCGI.

SH

Scott Hebert wrote:

I have a CustomField of type SelectSingle called “Product”.

$tickets->LimitCustomField(VALUE => “Product 1” , CUSTOMFIELD => $cfid);
$tickets->LimitCustomField(VALUE => “Product 2” , CUSTOMFIELD => $cfid);

it seems that it attempts to get all the tickets that have BOTH “Product
1” AND “Product 2” as values for the Custom Field “Product”.

I don’t believe that’s how it’s supposed to work; it should
only AND the limits if ($CF->Type eq ‘SelectMultiple’).
If that’s not the case, it’s probably a bug; the resulting
SQL query might help to track it down.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

I think I was mistaken in my logic …

Another question: How can I do a LimitCustomValues to get all Tickets that
have null values for a Custom Field?

Thanks,

SHFrom: Phil Homewood [mailto:pdh@snapgear.com]
Sent: Thursday, October 16, 2003 11:06 PM
To: rt-users@lists.fsck.com
Subject: Re: [rt-users] Question about LimitCustomField

Scott Hebert wrote:

I have a CustomField of type SelectSingle called “Product”.

$tickets->LimitCustomField(VALUE => “Product 1” , CUSTOMFIELD => $cfid);
$tickets->LimitCustomField(VALUE => “Product 2” , CUSTOMFIELD => $cfid);

it seems that it attempts to get all the tickets that have BOTH “Product
1” AND “Product 2” as values for the Custom Field “Product”.

I don’t believe that’s how it’s supposed to work; it should
only AND the limits if ($CF->Type eq ‘SelectMultiple’).
If that’s not the case, it’s probably a bug; the resulting
SQL query might help to track it down.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances
rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm