[rt-users] Scrip condition input request
Mathew Snyder
theillien at yahoo.com
Mon Nov 26 15:09:35 EST 2007
This is all I could think to come up with:
if ($self->TransactionObj->Type eq "Set" && $self->TransactionObj->Field eq
"Queue") {
if ($self->TransactionObj->NewValue eq "TechOps" && $self->TicketObj->Owner !=
10) {
return 0;
}else{
$self->TicketObj->SetStatus('new');
return 1;
}
}
But that seems a bit excessive since the condition is already telling it to
check that the queue is changing. If I eliminate the first if condition and
leave just the condition checking the new value will it work since it already
knows what the initial condition is?
Keep up with me and what I'm up to: http://theillien.blogspot.com
Todd Chapman wrote:
> Matt,
>
> You can either use a custom condition or use a conditional in your cleanup code.
>
> -Todd
>
> On 11/26/07, Mathew Snyder <theillien at yahoo.com> wrote:
>> I have a global scrip which applies to all of our queues. It basically forces
>> the status of a ticket to 'new' when it is moved to a different queue. For the
>> most part this works well. However, I have a group which has "ownership" of two
>> queues. One is our triage queue and the other is a queue for operational support.
>>
>> Sometimes, a person will take ownership of a ticket prior to moving it from
>> triage. If this happens, it makes setting the status back to new moot since the
>> original owner will likely retain ownership and continue working on the ticket.
>>
>> With that in mind I'm trying to devise a condition which will check if the new
>> queue is the ops support queue and if the current owner is a: not Nobody and b:
>> has the right to own a ticket in the ops support queue. Currently, the
>> condition for this scrip is 'On Queue Change'. In order to enact these other
>> conditions, will I have to use a custom condition and incorporate the
>> functionality of 'On Queue Change' or can I add the conditions to the Custom
>> action preparation code field and use it as an additional check?
>>
>> Or, can I simply use an 'unless' conditional in the Custom action cleanup code
>> field?
>>
>> --
>> Keep up with me and what I'm up to: http://theillien.blogspot.com
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
>>
>> If you sign up for a new RT support contract before December 31, we'll take
>> up to 20 percent off the price. This sale won't last long, so get in touch today.
>> Email us at sales at bestpractical.com or call us at +1 617 812 0745.
>>
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
More information about the rt-users
mailing list