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

Ernesto Hernandez-Novich emhnemhn at gmail.com
Mon Nov 17 17:17:43 EST 2008


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?
-- 
Ernesto Hernández-Novich - Linux 2.6.18 i686 - Unix: Live free or die!
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3




More information about the rt-users mailing list