[rt-users] CLI Scripting Question

Nehmer Torben torben.nehmer at cancom.de
Tue Nov 29 03:12:20 EST 2011

Good morning,

I am currently writing a few scripts for internal usage to faciliate some Scrum like pattern within RT. One script does create timeLeft Sums on all tickets of a given sprint (which is a parent ticket). While all and all this works great, I have a little question regarding RT::Ticket:

The main loop of the script should look for all tickets starting with the text "Sprint", doing about this:

my $tickets = RT::Tickets->new(RT->SystemUser);
$tickets->LimitQueue( VALUE => $queueName );
$tickets->LimitStatus( VALUE => 'new' );
$tickets->LimitStatus( VALUE => 'open' );
$tickets->LimitSubject( VALUE => "Sprint %", OPERATOR => 'LIKE' );
$tickets->OrderBy( FIELD => 'Id', ORDER => 'ASC' );

Unfortunalety, the LIKE operation seems to enclose the search pattern into wildcards as well, thus finding all tickets which contain the string "Sprint" anywhere in the ticket, not just in the subject.

The operator "STARTSWITH" is not accepted, although specifying STARTSWITH in an extended query in RT does yield the expected result.

Any hints how I can solve this?

Best regards,
Torben Nehmer
Torben Nehmer
Diplom Informatiker (FH)
Business System Developer
CANCOM Deutschland GmbH
Messerschmittstr. 20
89343 Scheppach
Tel.: +49 8225 - 996-1118
Fax: +49 8225 - 996-41118
torben.nehmer at cancom.de<mailto:torben.nehmer at cancom.de>
CANCOM Deutschland GmbH
Sitz der Gesellschaft: Jettingen-Scheppach
HRB 10653 Memmingen
Geschäftsführer: Martin Mayr, Tobias Hörmann
Diese E-Mail und alle mitgesendeten Dateien sind vertraulich und ausschließlich für den Gebrauch durch den Empfänger bestimmt!
This e-mail and any files transmitted with it are confidential intended solely for the use of the addressee!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111129/7bf85c64/attachment.htm>

More information about the rt-users mailing list