[Rt-devel] Ticket Ownership Enumeration Problem
Jesse Vincent
jesse at bestpractical.com
Tue Jan 11 00:28:29 EST 2005
> #...$org is gotten from custom field...
>
> if ($org eq 'HUMA') {
> my %HSD = ('jralbert' => 0, 'jafraser'=> 0, 'mhelfric' => 0);
> my $CurrentUser = $RT::SystemUser;
> my $OpenTickets;
> $OpenTickets = new RT::Tickets ($CurrentUser);
# This line serves no purpose
> while ($id, $score) = each(%HSD)) {
# There's no MyTickets object
> $MyTickets->UnLimit();
# Rather than do this, why don't you do:
my $MyTickets = RT::Tickets->new($RT::SystemUser);
> $MyTickets->LimitOwner( VALUE => "jralbert" );
> $MyTickets->LimitStatus( VALUE=> "open" );
> $HSD{$id} = $MyTickets->Count();
> }
> }
>
Once you have this all worked up, please document it on the wiki.
Jesse
> It looks as if the scrip dies on trying the LimitOwner method, and gets no
> further. What am I doing wrong? I thank you in advance for any help you may
> provide.
>
> Cheers,
> Jeff Albert
>
> Departmental Computing Support Team
> University of Victoria
> British Columbia, Canada
> jralbert at uvic dot ca
>
>
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
--
More information about the Rt-devel
mailing list