Script Codes

Is there a cheatsheet of RT script codes? and/or fieldcodes

Specifically, I’m looking to insert the “Real Name” of the user
assigned to a ticket. (currently inserts username)

also I’d like to generate the Email notification when the ticket is
first assigned from “nobody” to "somebody"
I’m currently using the owner change script. which sorta works, but does
not allow me to use owner change as it was intended.

Thanks,

David
System Administrator
RNS

Hi David;

What version of RT are you using, if its 3.8.8 then you should be able to change the user name format from
lib/RT/Config.pm

With regard to owner script, I am not quite sure what do you mean by " does not allow me to use owner change as it was intended"
What does n’t not do ??

Roy

Roy,
We are using currently using 3.8.7. Due to our workflow we combine
the creation and assignment. sending the customer one email informing
the customer of the ticket creation and who is working the issue.
However, by using the change owner as trigger, We can no longer use the
change owner script in the event of an escalation, or other change owner
event, because that script is now attached to the creation-assignment
template. By creating a “nobody” to “somebody” owner script and
attaching that to the creation-assignment template. It would leave the
owner change script free for a true owner change/escalation event Hope
that makes a little more sense.

Thanks,
David
System Admin
RNSOn 8/6/2010 3:47 AM, Raed El-Hames wrote:

Hi David;

What version of RT are you using, if its 3.8.8 then you should be able to change the user name format from
lib/RT/Config.pm

With regard to owner script, I am not quite sure what do you mean by " does not allow me to use owner change as it was intended"
What does n’t not do ??

Roy

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-
bounces@lists.bestpractical.com] On Behalf Of Sysadmin
Sent: 06 August 2010 01:55
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Script Codes

Is there a cheatsheet of RT script codes? and/or fieldcodes

Specifically, I’m looking to insert the “Real Name” of the user
assigned to a ticket. (currently inserts username)

also I’d like to generate the Email notification when the ticket is
first assigned from “nobody” to "somebody"
I’m currently using the owner change script. which sorta works, but
does
not allow me to use owner change as it was intended.

Thanks,

David
System Administrator
RNS

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I think I understand;
You can create a custom scrip with

Condition: User Defined
Custom condition:
if ($self->TransactionObj->Field eq ‘Owner’ and $self->TransactionObj->OldValue == 10) {
return 1;
}
return undef;

10 : is the default Users.id value for the nobody user.

Good luck;

Roy

This script is not working any other ideas. I got the template itself
fixed by Changing the ‘Name" field to ‘RealName’ but I cannot get RT to
send it when owner changes from Nobody to on of my support staff. I get
the object of the script, when the onwer value changes and old value was
’10’ (Nobody) return a value of 1. Perhaps something is missing from the
script?

Thanks,

David
System Admin
RNSOn 8/6/2010 9:41 AM, Raed El-Hames wrote:

I think I understand;
You can create a custom scrip with

Condition: User Defined
Custom condition:
if ($self->TransactionObj->Field eq ‘Owner’ and $self->TransactionObj->OldValue == 10) {
return 1;
}
return undef;

10 : is the default Users.id value for the nobody user.

Good luck;

Roy

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-
bounces@lists.bestpractical.com] On Behalf Of Sysadmin
Sent: 06 August 2010 16:08
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Script Codes

Roy,
We are using currently using 3.8.7. Due to our workflow we combine
the creation and assignment. sending the customer one email informing
the customer of the ticket creation and who is working the issue.
However, by using the change owner as trigger, We can no longer use
the
change owner script in the event of an escalation, or other change
owner
event, because that script is now attached to the creation-assignment
template. By creating a “nobody” to “somebody” owner script and
attaching that to the creation-assignment template. It would leave the
owner change script free for a true owner change/escalation event Hope
that makes a little more sense.

Thanks,
David
System Admin
RNS

On 8/6/2010 3:47 AM, Raed El-Hames wrote:

Hi David;

What version of RT are you using, if its 3.8.8 then you should be

able to change the user name format from

lib/RT/Config.pm

With regard to owner script, I am not quite sure what do you mean by

" does not allow me to use owner change as it was intended"

What does n’t not do ??

Roy

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-
bounces@lists.bestpractical.com] On Behalf Of Sysadmin
Sent: 06 August 2010 01:55
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Script Codes

Is there a cheatsheet of RT script codes? and/or fieldcodes

Specifically, I’m looking to insert the “Real Name” of the user
assigned to a ticket. (currently inserts username)

also I’d like to generate the Email notification when the ticket is
first assigned from “nobody” to "somebody"
I’m currently using the owner change script. which sorta works, but
does
not allow me to use owner change as it was intended.

Thanks,

David
System Administrator
RNS

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com