Use of LimitKeyword

Hi everybody,

I was trying to write a report component, that gives me back the number
of tickets, that are having a specific keyword assigned to them, but I
did not succeed. All I managed is to get either the total number of
tickets or zero.

I set up the keyword tree like this and assigned the keyword tree
global, single childs.


Afterwards i looked in the SQL Table KeywordSelects, for the Id to use
in LimitKeyword. Then I used this code:

my $num=0;
my $open = new RT::Tickets($session{‘CurrentUser’});

$open->LimitStatus(VALUE => ‘resolved’);
$open->LimitStatus(VALUE => ‘open’);
$open->LimitStatus(VALUE => ‘new’);

$open->LimitKeyword(KEYWORD => 2, OPERATOR => ‘IS’, KEYWORDSELECT => 1);
$open->OrderBy(FIELD => ‘Created’, ORDER => ‘asc’);

$num = $open->Count();


Could anybody give me some advice?

Thanks, Julian

Julian Hein NETWAYS GmbH
Managing Director Deutschherrnstr. 47a
Fon.0911/92885-11 D-90429 Nürnberg