Get Addresses of Watchers as custom role

Following on from my
previous post back in October, we now have a scenario where approval users of a new queue are to be defined as approvers for the whole queue (as watchers), rather than on a per-ticket basis.

With this setup, my scrip does not pick up the watcher because my $ticketApprovers = $self->TicketObj->RoleAddresses('RT::CustomRole-1'); only looks for approvers directly assigned to the ticket.

I have tried my $queueApprovers = $self->QueueObj->RoleAddresses('RT::CustomRole-1');, but the scrip just bombs out.

Looking through the docs, I wondered if my $queueApprovers = $self->TicketObj->QueueObj->RoleAddresses('RT::CustomRole-1');, but RT docs doesn’t seem to suggest this is possible.

Does anyone have an ideas/pointers how I can get this to work?

Many Thanks
James

I’ve not tried it, but maybe something like:

$self->TicketObj->QueueObj->RoleGroup('RT::CustomRole-1')->MemberEmailAddressesAsString

might get you what you want.