[rt-users] Custom Fields / Transaction Custom Fields in Scrips
Mike Coakley
mcoakley at managedbusiness.com
Fri Jul 7 16:44:39 EDT 2006
Travis,
Thanks for the input.
For the list... I have tried the Transaction Object as well and this does
not work either.
Thanks,
--
Mike Coakley
Managed Business
http://www.managedbusiness.com
http://my.managedbusiness.com
Voice - 973-252-0770 x2100
Fax - 973-252-1797
> From: "Brooks, Travis C." <travis at slac.stanford.edu>
> Date: Fri, 7 Jul 2006 13:42:27 -0700 (PDT)
> To: Mike Coakley <mcoakley at managedbusiness.com>
> Subject: Re: [rt-users] Custom Fields / Transaction Custom Fields in Scrips
>
> No, that's a Ticket CF, sorry. I haven't done this with Trans CFs. It
> seems to me that you should use the Transaction Obj for the Trans CFs (or
> covert to a ticket CF..)
>
> Anyway sorry I can't be of more help.
>
>
> Travis
>
> Travis C. Brooks
> SPIRES Scientific Databases Manager
> Stanford Linear Accelerator Center
> http://www.slac.stanford.edu/spires
>
> On Fri, 7 Jul 2006, Mike Coakley wrote:
>
>> Travis,
>>
>> I can use standard CF fields in a transaction BUT I'm having a problem with
>> Transactional Custom Fields. When I submit a new ticket or comment/reply on
>> a ticket the Transactional Custom Fields don't appear to be accessible
>> through a Scrip. Standard Global or Queue based Custom Fields are just fine.
>>
>> So if you are referring to Transactional Custom Field in your reply then I
>> don't know what is wrong because my code that basically does what yours does
>> (i.e. $self->TicketObj->FirstCustomFieldValue) doesn't work so I have no
>> idea what could be the problem.
>>
>> Thanks,
>>
>> --
>> Mike Coakley
>> Managed Business
>> http://www.managedbusiness.com
>> http://my.managedbusiness.com
>> Voice - 973-252-0770 x2100
>> Fax - 973-252-1797
>>
>>
>>
>>
>>> From: "Brooks, Travis C." <travis at slac.stanford.edu>
>>> Date: Fri, 7 Jul 2006 12:44:31 -0700 (PDT)
>>> To: Mike Coakley <mcoakley at managedbusiness.com>
>>> Cc: "rt-users at lists.bestpractical.com" <rt-users at lists.bestpractical.com>
>>> Subject: Re: [rt-users] Custom Fields / Transaction Custom Fields in Scrips
>>>
>>> The following works in RT3.6, both on creation, and on change of the CF.
>>>
>>> user def Condition:
>>> return(undef) if ($self->TicketObj->TimeEstimated);
>>> return(undef)
>>> unless($self->TicketObj->FirstCustomFieldValue('spires-difficulty'));
>>>
>>>
>>> user def Action prep:
>>> my $diff=$self->TicketObj->FirstCustomFieldValue('spires-difficulty');
>>> my $te=60;
>>> if ($diff eq 'Small'){
>>> $te=400;
>>> }
>>> if ($diff eq 'Medium'){
>>> $te=1600;
>>> }
>>> if ($diff eq 'Big'){
>>> $te=6400;
>>> }
>>> $self->TicketObj->setTimeEstimated($te);
>>>
>>>
>>> Note that I'm accessing the CF value by name. This CF is single valued so
>>> FirstCustomFieldValue works fine.
>>>
>>> Perhaps this is close to what you need?
>>>
>>>
>>>
>>> Travis C. Brooks
>>> SPIRES Scientific Databases Manager
>>> Stanford Linear Accelerator Center
>>> http://www.slac.stanford.edu/spires
>>>
>>> On Fri, 7 Jul 2006, Mike Coakley wrote:
>>>
>>>> Hello all...
>>>>
>>>> In further attempts to get this working I've done the following:
>>>>
>>>> 1. I upgraded to RT 3.6.0. Upgrade went smooth but this still does not
>>>> work.
>>>>
>>>> 2. In further research I found an article in the archives that stated that
>>>> this was a known issue back in the 3.4 timeframe basically stating the the
>>>> Transaction Custom Fields don't get populated until after the scrips are
>>>> run. There was a patch file available through the archives but this patch
>>>> file also did not fix my issue.
>>>>
>>>> So, I'm wondering if anyone has any further help or places I can look.
>>>>
>>>> Thanks,
>>>>
>>>> --
>>>> Mike Coakley
>>>> Managed Business
>>>> http://www.managedbusiness.com
>>>> http://my.managedbusiness.com
>>>> Voice - 973-252-0770 x2100
>>>> Fax - 973-252-1797
>>>>
>>>>
>>>>
>>>>
>>>>> From: Mike Coakley <mcoakley at managedbusiness.com>
>>>>> Date: Wed, 05 Jul 2006 16:02:42 -0400
>>>>> To: <rt-users at lists.bestpractical.com>
>>>>> Conversation: Custom Fields / Transaction Custom Fields in Scrips
>>>>> Subject: [rt-users] Custom Fields / Transaction Custom Fields in Scrips
>>>>>
>>>>> I'm trying to write a custom condition that will trigger every time a
>>>>> transaction custom field is updated that will update other custom fields.
>>>>> The idea is to keep track of time in a better way.
>>>>>
>>>>> So I have 2 custom fields: Billable Time and Non-Billable Time. These are
>>>>> attached to a ticket. I can easily manually update these fields. I also
>>>>> have
>>>>> two Transaction based custom fields: TRANS Billable Time and TRANS
>>>>> Non-Billable Time. I want to have a condition that fires when the "TRANS*"
>>>>> fields get updated. Then when the condition is fired the action will be to
>>>>> update the Billable Time and Non-Billable Time field appropriately.
>>>>>
>>>>> I've been doing some debugging within the Scrip condition and it appears
>>>>> the
>>>>> condition gets tested twice during a "comment" (haven't worked on reply
>>>>> yet). BUT I don't see the transaction custom field values so my condition
>>>>> fails. So I'm either not retrieving the transaction custom field values
>>>>> improperly (I get no value) or I'm not seeing the right condition.
>>>>>
>>>>> Anyone have any ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --
>>>>> Mike Coakley
>>>>> Managed Business
>>>>> http://www.managedbusiness.com
>>>>> http://my.managedbusiness.com
>>>>> Voice - 973-252-0770 x2100
>>>>> Fax - 973-252-1797
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>>>
>>>>> 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
>>>>>
>>>>>
>>>>> We're hiring! Come hack Perl for Best Practical:
>>>>> http://bestpractical.com/about/jobs.html
>>>>
>>>> _______________________________________________
>>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>>
>>>> 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
>>>>
>>>>
>>>> We're hiring! Come hack Perl for Best Practical:
>>>> http://bestpractical.com/about/jobs.html
>>>>
>>
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> 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
>>
>>
>> We're hiring! Come hack Perl for Best Practical:
>> http://bestpractical.com/about/jobs.html
>>
More information about the rt-users
mailing list