Hi all.
In OTRS version 2.4.7, when moving a Closed Ticket
into a queue changing its status to Open, OTRS does not send any notification
to the Users that put “Yes” in “Move Notification”
preferences.
As we can see through the History, OTRS first moves
the ticket while still Closed, and then opens it.
Move |
Ticket moved into
Queue "---destination queue---" (nn) from Queue[..] |
- |
username (Foo Foo) |
05/30/2011 17:10:34
|
OwnerUpdate |
New owner is
"root@localhost" (ID=1). |
- |
root@localhost
(Admin OTRS) |
05/30/2011 17:10:34
|
Unlock |
Unlocked ticket. |
- |
root@localhost
(Admin OTRS) |
05/30/2011 17:10:34
|
StateUpdate |
Old: "closed
successful" New: "open" |
- |
Username (Foo Foo) |
05/30/2011 17:10:34
|
AddNote |
Added note (Move) |
|
Username (Foo Foo) |
05/30/2011 17:10:34
|
Around line
# send move notify to queue
subscriber
if ( !$Param{SendNoNotification}
&& $Ticket{StateType} ne 'closed' ) {
my %Used =
();
my
@UserIDs = $Self->GetSubscribedUserIDsByQueueID( QueueID =>
$Param{QueueID} );
if ( $Param{ForceNotificationToUserID}
) {
push @UserIDs, @{ $Param{ForceNotificationToUserID} };
}
for my
$UserID (@UserIDs) {
if ( !$Used{$UserID} && $UserID ne $Param{UserID} ) {
$Used{$UserID} = 1;
my %UserData = $Self->{UserObject}->GetUserData(
UserID => $UserID,
Cached => 1,
Valid => 1,
);
next if !$UserData{UserSendMoveNotification};
#
send agent notification
$Self->SendAgentNotification(
Type
=> 'Move',
RecipientID =>
$UserID,
CustomerMessageParams => {
Queue => $Queue,
Body => $Param{Comment} || '',
},
TicketID => $Param{TicketID},
UserID => $Param{UserID},
);
}
}
This excerpt shows that no notification are sent it
the ticket is Closed.
We need that users are always notified when a ticket
is moved into one of their monitored queues. There’s not a function to directly
Open a Closed Ticket, so users are forced to move the ticket twice: the first
time opening it, and the second one moving it already open…
Questions are:
1) Why
that behaviour?
2) Can
we modify code in order to have the notification even when the ticket is
Closed? (i.e.: removing or modifying the initial “if”)
3) Should
we face any problems when modifying the code?
Thanks a lot for your help.
Regards.
Davide Manzi