Adding custom field to the Queue object thru initial data script (4.0.2)

I am trying to create a custom field on the Queue object with the initial data script, which has the following entry:

{
    Name        => 'Country',
    Type        => 'SelectSingle',
    LookupType  => 'RT::Queue',
    Disabled    => 0,
    Queue       => 0,
    Description => 'Country information is used to identify country specific queues',
},

My assumption is specifying the LookupType as ‘RT::Queue’ will make it add it to the Queue object. But this gets added to the Ticket object.
How do I add custom field to the Queue object thru the initial data scripts?

Thanks
Srikumar

Has anyone tried to add custom fields to the Queue object (or any other Ticket objects) thru the initial data scripts (which will be run with the $RT_HOME/sbin/rt-setup-database command)?

Also, is there a place where I can find the list of different Types I can use in script?
Basically these should correspond to various drop down values for Type in the web UI where you define the Custom Fields.

Thanks again…

I am trying to create a custom field on the Queue object with the initial data script, which has the following entry:

{
    Name        => 'Country',
    Type        => 'SelectSingle',
    LookupType  => 'RT::Queue',
    Disabled    => 0,
    Queue       => 0,
    Description => 'Country information is used to identify country specific queues',
},

My assumption is specifying the LookupType as ‘RT::Queue’ will make it add it to the Queue object. But this gets added to the Ticket object.
How do I add custom field to the Queue object thru the initial data scripts?

Thanks
Srikumar

-------- RT Training Sessions (http://bestpractical.com/services/training.html) * Washington DC, USA ˜ October 31 & November 1, 2011 * Barcelona, Spain ˜ November 28 & 29, 2011

I am trying to create a custom field on the Queue object with the initial data script, which
has the following entry:
Queue => 0,

Don’t pass this line, it’ll cause Custom Field to make some bad
backwards-compatibility decisions

-kevin

Thanks Kevin…

I got that suggestion (Queue => 0) from Ruslan for another question.

BTW, back to my original question…

I am trying to create a custom field on the Queue object with the initial
data script, which has the following entry:

{
    Name        => 'Country',
    Type        => 'SelectSingle',
    LookupType  => 'RT::Queue',
    Disabled    => 0,
    Queue       => 0,
    Description => 'Country information is used to identify country

specific queues’,
},

My assumption is specifying the LookupType as ‘RT::Queue’ will make it add
it to the Queue object. But this gets added to the Ticket object.

How do I add custom field to Queue Object?

ThanksOn 10/26/11 3:09 PM, “Kevin Falcone” falcone@bestpractical.com wrote:

On Fri, Oct 21, 2011 at 10:42:43PM +0000, Srikumar Nair wrote:

I am trying to create a custom field on the Queue object with the
initial data script, which
has the following entry:
Queue => 0,

Don’t pass this line, it’ll cause Custom Field to make some bad
backwards-compatibility decisions

-kevin

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Washington DC, USA — October 31 & November 1, 2011
  • Barcelona, Spain — November 28 & 29, 2011

I got that suggestion (Queue => 0) from Ruslan for another question.

Correct, it applies to Ticket Custom Fields, which is the question
Ruslan was answering.

BTW, back to my original question…

I am trying to create a custom field on the Queue object with the initial
data script, which has the following entry:

{
    Name        => 'Country',
    Type        => 'SelectSingle',
    LookupType  => 'RT::Queue',
    Disabled    => 0,
    Queue       => 0,
    Description => 'Country information is used to identify country

specific queues’,
},

My assumption is specifying the LookupType as ‘RT::Queue’ will make it add
it to the Queue object. But this gets added to the Ticket object.

How do I add custom field to Queue Object?

Remove Queue => 0 from the code you’ve pasted.

-kevin

That is perfect. That did the trick…On 10/26/11 3:24 PM, “Kevin Falcone” falcone@bestpractical.com wrote:

On Wed, Oct 26, 2011 at 10:20:24PM +0000, Srikumar Nair wrote:

I got that suggestion (Queue => 0) from Ruslan for another question.

Correct, it applies to Ticket Custom Fields, which is the question
Ruslan was answering.

BTW, back to my original question…

I am trying to create a custom field on the Queue object with the
initial
data script, which has the following entry:

{
    Name        => 'Country',
    Type        => 'SelectSingle',
    LookupType  => 'RT::Queue',
    Disabled    => 0,
    Queue       => 0,
    Description => 'Country information is used to identify country

specific queues’,
},

My assumption is specifying the LookupType as ‘RT::Queue’ will make it
add
it to the Queue object. But this gets added to the Ticket object.

How do I add custom field to Queue Object?

Remove Queue => 0 from the code you’ve pasted.

-kevin

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Washington DC, USA — October 31 & November 1, 2011
  • Barcelona, Spain — November 28 & 29, 2011

Hi all,

I’m trying to get an idea of how this would be accomplished.

What we’re hoping to do is modify one of our queues so that if a requestor CC’s someone on the initial ticket, that CC will be removed from all subsequent comments/correspondance. I took a quick look through the RT contributions archive, but I couldn’t see any scrips that would match this functionality. Is anyone out there aware of anything like this or have a hint as to how this could be done? We need this to be done only for a single queue, so modifying RT_SiteConfig.pm isn’t really an option for us.

Many thanks,

Dan Rohan

Hi,

I guess you could make a scrip which launches during ticket creation
(Transaction Batch) which removes anyone in the CC for that ticket.

Since it launches in batch it will do it’s work after the ticket is
created, so those in CC would still be fairly easy to add if needed during
replies.

This scrip does the oposite but might give you some ideas:
http://requesttracker.wikia.com/wiki/OnCreateSetDeptHeadCc

– Bart

Op 1 december 2011 12:10 schreef Daniel G. Rohan
d-rohan@northwestern.eduhet volgende: