<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
This can not be done here.<br>
In some queues those responsible for sending transactions (including
tickets resolution) are not directly involved in the work of
tickets.<br>
<br>
Even I used the scrip "<a
href="http://requesttracker.wikia.com/wiki/AutoSetOwner">AutoSetOwner</a>"
as a basis to create mine.<br>
<br>
Anyway thanks for your answer.<br>
Would have another suggestion?<br>
<pre class="moz-signature" cols="72">Murillo Azambuja Gonçalves
____________________________________________________
</pre>
<div class="moz-cite-prefix">On 07/16/2015 11:37 AM, Matt Zagrabelny
wrote:<br>
</div>
<blockquote
cite="mid:CAOLfK3UTC6aLm=2V30MEtqZFCwWhhKm7gLP54_pGk=Z9en2w4Q@mail.gmail.com"
type="cite">
<pre wrap="">Hi,
I didn't read everything in your email. :)
Have you considered a lifecycle where only the Owner is granted the
right to resolve the ticket?
-m
On Thu, Jul 16, 2015 at 9:34 AM, Murillo Azambuja Gonçalves
<a class="moz-txt-link-rfc2396E" href="mailto:murillo@ifi.unicamp.br"><murillo@ifi.unicamp.br></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,
I'm using RT 4.2.8 and would like to prevent ticket resolution in which the
owner is "Nobody".
For that I'm doing two steps:
Change the custom condition of scrip "On Resolve Notify Requestors" to not
notify requesters if Owner is 'Nobody':
Description: On Resolve Notify Requestors
Condition: User Defined
Action: Notify Requestors
Template: resolved in HTML
Custom condition:
if((
($self->TransactionObj->Type eq 'Status') or
($self->TransactionObj->Type eq 'Set' and
$self->TransactionObj->Field eq 'Status')
) and
$self->TransactionObj->NewValue eq 'resolved'
) {
if($self->TicketObj->Owner == $RT::Nobody->id) {
$RT::Logger->debug("Do not notify requestors if Owner is
Nobody");
return 0;
} else {
return 1;
}
}
return 0;
Create scrip to change status from resolved to it's old value:
Description: On Resolve Check Owner
Condition: On Resolve
Action: User Defined
Template: Blank
Custom action commits code:
# get actor ID
my $Actor = $self->TransactionObj->Creator;
# if actor is RT_SystemUser then get out of here
return 1 if $Actor == $RT::SystemUser->id;
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
my ($status, $msg) =
$self->TicketObj->SetStatus($self->TransactionObj->OldValue);
unless($status) {
$RT::Logger->error("Error when setting new status: $msg");
return undef;
}
$RT::Logger->debug("Status changed");
return 1;
(The scrips above are divided just for separation of concerns purposes)
It works, but the message that appears confuses the user: "Status changed
from 'open' to 'resolved'". But in fact, the status of the ticket is "open"
(setted in scrip above).
Actually I would like to "lock" the screen, warning the user that it is
necessary to assign an owner before resolving the ticket.
Someone suggests a better solution? How could I lock the screen and display
a message to the user?
I tried using the plugin "MandatoryOnTransition" for this purpose, but does
not work because it just considers empty fields, and the owner is set to
"Nobody", not empty:
Set (% MandatoryOnTransition,
'*' => {
'* -> Resolved' => ['TimeWorked', 'Owner'],
},
);
Please help me.
Thanks in advance.
--
Murillo Azambuja Gonçalves
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>