[rt-users] CLI Scripting Question

Bart bart at pleh.info
Tue Nov 29 03:41:00 EST 2011


Could you try this condition:

$tickets->LimitSubject( VALUE => “*^*Sprint %”, OPERATOR => 'LIKE' );


-- Bart


Op 29 november 2011 09:12 schreef Nehmer Torben
<torben.nehmer at cancom.de>het volgende:

> 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
> Germany****
>
> Tel.: +49 8225 - 996-1118
> Fax: +49 8225 - 996-41118
> torben.nehmer at cancom.de
> www.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!****
>
> ** **
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston — TBA
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111129/f9524bd6/attachment.htm>


More information about the rt-users mailing list