[rt-users] Use of LimitKeyword

Julian Hein jhein at netways.de
Tue Jan 22 06:30:58 EST 2002


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.  

LeadStatus(1)
LeadStatus/positive(2)
LeadStatus/negative(3)

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

<%PERL>
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();


</%PERL>
<%$num%>

Could anybody give me some advice?

Thanks, Julian

__________________________________________________________
Julian Hein                   NETWAYS GmbH
Managing Director             Deutschherrnstr. 47a
Fon.0911/92885-11             D-90429 Nürnberg
Fax.0911/92885-31                                        
jhein at netways.de              www.netways.de              




More information about the rt-users mailing list