Showing open tickets in queues user has OwnTicket rights

Heya,

I’ve created an “openTickets” Element, which basically just shows the top
25 open tickets in queues the user has read access to, but limiting it with

my $OpenTickets;
$OpenTickets = new RT::Tickets ($session{‘CurrentUser’});
$OpenTickets->LimitStatus(VALUE => “open”);
$OpenTickets->LimitStatus(VALUE => “new”);
$OpenTickets->LimitOwner(VALUE => “Nobody”);
$OpenTickets->OrderBy(FIELD => ‘Priority’, ORDER => ‘DESC’);
$OpenTickets->RowsPerPage(25);

Now I would like to make it so it ONLY shows tickets that the user can own,
eg, only tickets in relevent queues… Is there an easy way to do this?

Matthew Watson
Development, Netspace Online Systems
mwatson@netspace.net.au

Have a look at the man pages for RT::User and RT::Users
I think there’s a HasQueueRight that will do the trick.

-fr.On Fri, 4 Jan 2002 17:23:33 +1100 “Matthew Watson” mwatson@netspace.net.au wrote:

Heya,

I’ve created an “openTickets” Element, which basically just shows the top
25 open tickets in queues the user has read access to, but limiting it with

my $OpenTickets;
$OpenTickets = new RT::Tickets ($session{‘CurrentUser’});
$OpenTickets->LimitStatus(VALUE => “open”);
$OpenTickets->LimitStatus(VALUE => “new”);
$OpenTickets->LimitOwner(VALUE => “Nobody”);
$OpenTickets->OrderBy(FIELD => ‘Priority’, ORDER => ‘DESC’);
$OpenTickets->RowsPerPage(25);

Now I would like to make it so it ONLY shows tickets that the user can own,
eg, only tickets in relevent queues… Is there an easy way to do this?


Matthew Watson
Development, Netspace Online Systems
mwatson@netspace.net.au


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

Feargal Reilly, | Communications House,
Systems Administrator. | 1a Lower Pembroke Street,
The CIA - http://www.thecia.ie/ | Dublin 2,
Ph: +353-1-6768230 Fax: +353-1-6767720 | Ireland.

PGP fingerprint: 9EA0 F62E 2345 6062 E522 00F2 31D0 B1B0 D678 96DB