[rt-users] How to query for list of watchers for each queue from perl?
Michael J. Carter
mcarter at lanl.gov
Wed Aug 2 13:43:34 EDT 2006
I have a reporting script that I'm porting from rt-2.0 to rt-3.4. In the
old days, I would query the database directly to get a list of all queue
watchers:
my $str = $dbh->prepare( "SELECT distinct users.id, users.emailaddress FROM users, watchers WHERE users.id = watchers.owner AND watchers.scope = 'Queue' AND watchers.value = ?");
$str->bind_param(1,$queue_id);
$str->execute;
I've poked around in the new code a bit, and have played with the
RT::Queues object, but I don't see a way to get a list of watchers from
it.
Am I headed down the wrong path?
--
Michael J. Carter
More information about the rt-users
mailing list