Method LimitCustomFields

Hello,

i have some difficulties with LimitCustomFields(). I tried to write a perl
script that looks for tickets, which have a custom field that is not empty.
Here’s the code:

—snip—
my $tickets = new RT::Tickets($RT::SystemUser);
$tickets->LimitStatus(VALUE => ‘stalled’);
$tickets->LimitQueue(VALUE => $queue->Id);
$tickets->LimitCustomField( CUSTOMFIELD => ‘Resubmission’ ,
OPERATOR => ‘!=’,
VALUE => ‘’ );
—snap—

As a result, i got all stalled tickets in the queue, no matter if the CF is
empty or not.

I could use some help, please.

Peter
a d e s s o AG http://www.adesso.de| Fon : +49 231 930 - 9247
Stockholmer Allee 24 | Fax : +49 231 930 - 9331
44269 Dortmund | eMail: reich@adesso.de

I couldn’t give you full solution, but I remeber that there were fixe
for queries like “CF.XXX has value” in the latest RT3.4 releases.

May be you should try:
$tickets->LimitCustomField( CUSTOMFIELD => ‘Resubmission’ ,
OPERATOR => ‘IS NOT’,
VALUE => ‘NULL’ );

Check SQL log.On 11/17/05, Peter Reich reich@adesso.de wrote:

Hello,

i have some difficulties with LimitCustomFields(). I tried to write a perl
script that looks for tickets, which have a custom field that is not empty.
Here’s the code:

—snip—
my $tickets = new RT::Tickets($RT::SystemUser);
$tickets->LimitStatus(VALUE => ‘stalled’);
$tickets->LimitQueue(VALUE => $queue->Id);
$tickets->LimitCustomField( CUSTOMFIELD => ‘Resubmission’ ,
OPERATOR => ‘!=’,
VALUE => ‘’ );
—snap—

As a result, i got all stalled tickets in the queue, no matter if the CF is
empty or not.

I could use some help, please.

Peter

a d e s s o AG http://www.adesso.de| Fon : +49 231 930 - 9247
Stockholmer Allee 24 | Fax : +49 231 930 - 9331
44269 Dortmund | eMail: reich@adesso.de


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

Best regards, Ruslan.

Hi Ruslan,

Ruslan Zakirov ruslan.zakirov@gmail.com schrieb am 22.11.2005 23:03:36:

This mail template has been enhanced with PGPNotes.

I couldn’t give you full solution, but I remeber that there were fixe
for queries like “CF.XXX has value” in the latest RT3.4 releases.

May be you should try:
$tickets->LimitCustomField( CUSTOMFIELD => ‘Resubmission’ ,
OPERATOR => ‘IS NOT’,
VALUE => ‘NULL’ );

Check SQL log.

Yes, that solved my Problem. Thanks!

Peter
a d e s s o AG http://www.adesso.de| Fon : +49 231 930 - 9247
Stockholmer Allee 24 | Fax : +49 231 930 - 9331
44269 Dortmund | eMail: reich@adesso.de