Alter custom field (rt-3.4)

According to the wiki[1], there is no way to use the rt tool to make
mass updates to a custom field value. Has anyone written a script that
can handle this task?

Thanks,
William

[1] http://wiki.bestpractical.com/view/UseRtTool

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

William,

What kind of bulk update do you want to do? If you want to update the 

value for a specific custom field in each ticket instance, I have a
procedure that will do that and it uses normal RT functionality.

Kenn
LBNLOn 12/11/2007 2:38 PM, William McKee wrote:

According to the wiki[1], there is no way to use the rt tool to make
mass updates to a custom field value. Has anyone written a script that
can handle this task?

Thanks,
William

[1] UseRtTool - Request Tracker Wiki

Not sure if this is what you mean. You can add a new CF value, then run a
query for the old value, and then in the bulk update page remove the old
value and add the new one.On 12/11/07, William McKee william@knowmad.com wrote:

According to the wiki[1], there is no way to use the rt tool to make
mass updates to a custom field value. Has anyone written a script that
can handle this task?

Thanks,
William

[1] UseRtTool - Request Tracker Wiki


Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee


The rt-users Archives

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we’ll
take
up to 20 percent off the price. This sale won’t last long, so get in touch
today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Not sure if this is what you mean. You can add a new CF value, then run a
query for the old value, and then in the bulk update page remove the old
value and add the new one.

Thanks for the response. Here’s what I did. I have a CF that is “Select
one value”. I changed an existing value to a new name. Unfortunately,
this update did not propagate to the tickets that were already tagged.
So, I need to find a way to re-classify all those tickets which have the
old value in the CF field.

I hadn’t considered your idea, but, when I went to do the multiple
update, I discovered that RT-3.4 cannot update custom fields.

Thanks,
William

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

What kind of bulk update do you want to do? If you want to update
the value for a specific custom field in each ticket instance, I have a
procedure that will do that and it uses normal RT functionality.

Hi Kenn,

Thanks for your response. I just sent a response to Todd which explains
what I’m trying to accomplish. I do want to update the value of a
specific field. Please send me your procedure.

Thanks,
William

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

At Wednesday 12/12/2007 09:59 AM, William McKee wrote:

Thanks for the response. Here’s what I did. I have a CF that is “Select
one value”. I changed an existing value to a new name. Unfortunately,
this update did not propagate to the tickets that were already tagged.
So, I need to find a way to re-classify all those tickets which have the
old value in the CF field.

I hadn’t considered your idea, but, when I went to do the multiple
update, I discovered that RT-3.4 cannot update custom fields.

Thanks,
William

William,

I don’t know if you’re into perl scripting against the RT API, but I
found this link that shows a script that does what you want:

http://use.perl.org/~Robrt/journal/25746

Steve

At Wednesday 12/12/2007 09:26 AM, you wrote:

Not sure if this is what you mean. You can add a new CF value, then
run a query for the old value, and then in the bulk update page
remove the old value and add the new one.

According to the wiki[1], there is no way to use the rt tool to make
mass updates to a custom field value. Has anyone written a script that
can handle this task?

Thanks,
William

I think William is on 3.4, so there’s no bulk CF update in the web
interface. The only solution (short of a 3.6 upgrade) would be a
custom perl script - I don’t think the 3.4 CLI can do this.

Steve

William,

I didn't know you were on 3.4. My procedure is for 3.6 and basically 

similar to what was mentioned before. Sorry.

Kenn
LBNLOn 12/12/2007 7:01 AM, William McKee wrote:

On Tue, Dec 11, 2007 at 04:13:52PM -0800, Kenneth Crocker wrote:

What kind of bulk update do you want to do? If you want to update
the value for a specific custom field in each ticket instance, I have a
procedure that will do that and it uses normal RT functionality.

Hi Kenn,

Thanks for your response. I just sent a response to Todd which explains
what I’m trying to accomplish. I do want to update the value of a
specific field. Please send me your procedure.

Thanks,
William

You could modify the database table directly if you don’t mind not
having a ticket history entry for it. Table ObjectCustomFieldValues.On 12/11/07, William McKee william@knowmad.com wrote:

According to the wiki[1], there is no way to use the rt tool to make
mass updates to a custom field value. Has anyone written a script that
can handle this task?

Thanks,
William

[1] UseRtTool - Request Tracker Wiki


Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee


The rt-users Archives

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we’ll take
up to 20 percent off the price. This sale won’t last long, so get in touch
today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I don’t know if you’re into perl scripting against the RT API, but I
found this link that shows a script that does what you want:

http://use.perl.org/~Robrt/journal/25746

Thanks for the url Steve! I’m a decent Perl programmer but am not at all
familiar with the RT API. I’ve been playing around with that script but
don’t quite have the hang of it yet. I’ll keep working on it.

William

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

I didn’t know you were on 3.4. My procedure is for 3.6 and basically
similar to what was mentioned before. Sorry.

No worries, I appreciated the response and it gives me another incentive
to get migrated to 3.6 :wink:

William

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

You could modify the database table directly if you don’t mind not
having a ticket history entry for it. Table ObjectCustomFieldValues.

Ahhh, that was my first thought, but then I thought better of it as I’m
not familiar with the internals of RT. I’m working with a script that
Stephen Turner suggested and will post back my results. I may still opt
for this last ditch solution if needed so thanks for the table name.

Cheers,
William

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee

Thanks for the url Steve! I’m a decent Perl programmer but am not at all
familiar with the RT API. I’ve been playing around with that script but
don’t quite have the hang of it yet. I’ll keep working on it.

OK, after some more tinkering, I’ve come up with a working script that
was able to successfully change my CF values. I’ve posted it to the
wiki[1].

Thanks for your input!
William

[1] CustomField - Request Tracker Wiki

Knowmad Technologies - Web Site Development & Programming
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee