
I thought that this code was already in the queue module. I'm using 1.2.3, maybe it got removed from later versions. Anyways, here's the code you requested: =item GetAllUserIDsByQueueID() ... ... =cut sub GetAllUserIDsByQueueID { my $Self = shift; my %Param = @_; # check needed stuff if (!$Param{QueueID}) { $Self->{LogObject}->Log(Priority => 'error', Message => "Need QueueID!"); return; } # db quote foreach (keys %Param) { $Param{$_} = $Self->{DBObject}->Quote($Param{$_}); } # fetch all queues my @UserIDs = (); $Self->{DBObject}->Prepare( SQL => "SELECT user_id FROM personal_queues ". " WHERE ". " queue_id = $Param{QueueID} ", ); while (my @RowTmp = $Self->{DBObject}->FetchrowArray()) { push (@UserIDs, $RowTmp[0]); } return @UserIDs; } # -- Christopher J. Peterson Compulit, Inc (616)285-9590 cpeterso@compulit.com

Ok, I added that code, thanks very much. Maybe I need to downgrade because now I need the following: SendNotification
From Kernel/System/Ticket.pm
Thanks for your help with this.
Quoting Chris Peterson
I thought that this code was already in the queue module. I'm using 1.2.3, maybe it got removed from later versions. Anyways, here's the code you requested:
=item GetAllUserIDsByQueueID()
...
...
=cut
sub GetAllUserIDsByQueueID {
my $Self = shift;
my %Param = @_;
# check needed stuff
if (!$Param{QueueID}) {
$Self->{LogObject}->Log(Priority => 'error', Message => "Need QueueID!");
return;
}
# db quote
foreach (keys %Param) {
$Param{$_} = $Self->{DBObject}->Quote($Param{$_});
}
# fetch all queues
my @UserIDs = ();
$Self->{DBObject}->Prepare(
SQL => "SELECT user_id FROM personal_queues ".
" WHERE ".
" queue_id = $Param{QueueID} ",
);
while (my @RowTmp = $Self->{DBObject}->FetchrowArray()) {
push (@UserIDs, $RowTmp[0]);
}
return @UserIDs;
}
# --
Christopher J. Peterson
Compulit, Inc
(616)285-9590
cpeterso@compulit.com
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
participants (2)
-
bcarpio@americanitsolutions.us
-
Chris Peterson