Could you try this condition:<div><br></div><div>$tickets->LimitSubject( VALUE => “<b>^</b>Sprint %”, OPERATOR => 'LIKE' );</div><div><br></div><div><br></div><div>-- Bart<br>
<br><br><div class="gmail_quote">Op 29 november 2011 09:12 schreef Nehmer Torben <span dir="ltr"><<a href="mailto:torben.nehmer@cancom.de">torben.nehmer@cancom.de</a>></span> het volgende:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-GB">Good morning,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">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:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">The main loop of the script should look for all tickets starting with the text “Sprint”, doing about this:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">my $tickets = RT::Tickets->new(RT->SystemUser);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">$tickets->LimitQueue( VALUE => $queueName );<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">$tickets->LimitStatus( VALUE => 'new' );<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">$tickets->LimitStatus( VALUE => 'open' );<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">$tickets->LimitSubject( VALUE => “Sprint %”, OPERATOR => 'LIKE' );<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">$tickets->OrderBy( FIELD => 'Id', ORDER => 'ASC' );<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">The operator “STARTSWITH” is not accepted, although specifying STARTSWITH in an extended query in RT does yield the expected result.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Any hints how I can solve this?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Best regards,<br>Torben Nehmer<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:7.5pt">-------<br>Torben Nehmer<br>Diplom Informatiker (FH)<br>Business System Developer</span><span style="font-size:12.0pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt">CANCOM Deutschland GmbH<br>Messerschmittstr. 20<br>89343 Scheppach<br>Germany</span><span style="font-size:12.0pt"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">Tel.: +49 8225 - 996-1118<br>
Fax: +49 8225 - 996-41118<br></span><span style="font-size:12.0pt"><a href="mailto:torben.nehmer@cancom.de" target="_blank"><span lang="EN-US" style="font-size:7.5pt;color:blue">torben.nehmer@cancom.de</span></a></span><span lang="EN-US" style="font-size:10.0pt"><br>
</span><span style="font-size:10.0pt"><a href="http://www.cancom.de/" target="_blank"><span lang="EN-US" style="font-size:7.5pt;color:blue">www.cancom.de</span></a></span><span lang="EN-US" style="font-size:12.0pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt">CANCOM Deutschland GmbH<br>Sitz der Gesellschaft: Jettingen-Scheppach<br>HRB 10653 Memmingen<br>Geschäftsführer: Martin Mayr, Tobias Hörmann</span><span style="font-size:12.0pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt">Diese E-Mail und alle mitgesendeten Dateien sind vertraulich und ausschließlich für den Gebrauch durch den Empfänger bestimmt! <br></span><span lang="EN-US" style="font-size:7.5pt">This e-mail and any files transmitted with it are confidential intended solely for the use of the addressee!</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p></div></div><br>--------<br>
RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
* Boston — TBA<br></blockquote></div><br></div>