[rt-users] How can you use requestor info in custom field

Alex Peters alex at peters.net
Fri Jul 18 09:25:01 EDT 2014


Values within quotes are taken literally:

'$self->TransactionObj->CreatorObj->City'

means output "$self->TransactionObj->CreatorObj->City".  Removing the
quotes:

$self->TransactionObj->CreatorObj->City

means output the resultant value of that, and should therefore have the
desired effect.


On 18 July 2014 23:20, Thomas, Adam (Lakefield) <Adam.Thomas at sgs.com> wrote:

> Thank you for the response, forgive me I am new at this, very new…
>
>
>
> $self->TicketObj->AddCustomFieldValue( Field => 'location', Value =>
> '$self->TransactionObj->CreatorObj->City' );
>
>
>
> Is the code I have and it is literally putting in just the line. Where do
> I need to correct my syntax?
>
>
>
> *Adam Thomas*
>
> *SGS Canada*
>
> Application Support - Big Machines Development
>
>
>
> *SGS Canada*
>
> Phone: +1-705-652-2000 ext 2505
>
> Cell: +1-705-957-1618
>
> E-mail: adam.thomas at sgs.com <Jessica.martin at sgs.com>
>
>
>
> *From:* Alex Peters [mailto:alex at peters.net]
> *Sent:* July-18-14 9:10 AM
> *To:* Thomas, Adam (Lakefield)
> *Cc:* rt-users at lists.bestpractical.com
> *Subject:* Re: [rt-users] How can you use requestor info in custom field
>
>
>
> You can do this with a scrip which fires on ticket creation, accesses the
> user's relevant location information, then puts it in the ticket's custom
> field.
>
>
>
> The location information of the user creating the ticket can be accessed
> in scrip code via:
>
>
>
> $self->TransactionObj->CreatorObj->Organization
>
> $self->TransactionObj->CreatorObj->Address1
>
> $self->TransactionObj->CreatorObj->Address2
>
> $self->TransactionObj->CreatorObj->City
>
> $self->TransactionObj->CreatorObj->State
>
> $self->TransactionObj->CreatorObj->Zip
>
> $self->TransactionObj->CreatorObj->Country
>
>
> A ticket's custom field can be modified in scrip code via:
>
>
>
> $self->TicketObj->AddCustomFieldValue( Field => 'location', Value => '...'
> );
>
>
>
> On 17 July 2014 22:51, AdamThomas <adam.thomas at sgs.com> wrote:
>
> When a ticket is emailed in I want the requestors location to be auto
> populated into my custom field "location".
>
> My user profile automatically detects their location in their user profile
>
>
>
> --
> View this message in context:
> http://requesttracker.8502.n7.nabble.com/How-can-you-use-requestor-info-in-custom-field-tp57959.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> --
> RT Training - Boston, September 9-10
> http://bestpractical.com/training
>
>
> Information in this email and any attachments is confidential and intended
> solely for the use of the individual(s) to whom it is addressed or
> otherwise directed. Please note that any views or opinions presented in
> this email are solely those of the author and do not necessarily represent
> those of the Company. Finally, the recipient should check this email and
> any attachments for the presence of viruses. The Company accepts no
> liability for any damage caused by any virus transmitted by this email. All
> SGS services are rendered in accordance with the applicable SGS conditions
> of service available on request and accessible at
> http://www.sgs.com/en/Terms-and-Conditions.aspx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140718/91c4c11f/attachment.htm>


More information about the rt-users mailing list