[rt-users] A serial custom field... sort of

Kenneth Crocker KFCrocker at lbl.gov
Mon Nov 17 18:58:41 EST 2008


Ernesto,


	When creating a Ticket CF, one of the steps is to choose which Queues 
to "Apply" it to. If it is Global, then you navigate to 
Configuration->Global->Custom Fields and in that screen each CF you 
check will be Global, meaning it is applied to ALL queues. I can't 
comment on how you use them or your code, as I haven't seen it. But 
that's how to apply a CF.


Kenn
LBNL

On 11/17/2008 2:17 PM, Ernesto Hernandez-Novich wrote:
> On Mon, 2008-09-22 at 10:20 -0700, Kenneth Crocker wrote:
>> What you are talking about is a Queue-specific reference number. Not 
>> hard to do. For every queue that needs this, define the CF with an 
>> appropriate name for a specific Queue (I believe in 3.8.1 you can define 
>> Queue-level CF's that do NOT have to be on a ticket.
> 
> I'm using 3.6 and can't upgrade to 3.8 for the time being.
> 
> I've used 'my-seq' and 'my-val' as CFs. The former is supposed to hold
> the last used value while the latter holds the value for the current
> ticket. I created both CFs as applying to Tickets; if I understand
> correctly 'my-seq' should be a "per queue" CF but I can't find a way to
> do that in 3.6
> 
>> You then write a Queue-level script that examines a transaction and if the type 
>> is a create, and it is for one of the Queues that needs this CF, then 
>> pull the CF for THAT "Queue" and add 1 to it and then put that new 
>> number back in the "Queue-level" CF and also insert it into the new 
>> ticket in that queue. Hope this helps.
> 
> I wrote a scrip that reads my-seq, increments it and then stores it in
> both fields. When I create a new ticket, both fields end up with the
> same value, the problem being that 'my-seq' behaves like it's undefined
> for every ticket, so all my tickets end up with 1 stored in my-seq and
> my-val. I think 'my-seq' is different for every ticket, instead of being
> a singleton.
> 
> Ideas or suggestions?




More information about the rt-users mailing list