3.4.5 Bulk ticket update: Custom fields?

Is there any way to update custom fields on a pile of tickets at once?

The ‘Update multiple tickets’ button gives me
X Update selected tickets
Make Owner: ( Force change)
Add Requestor:
Remove Requestor:
Add Cc:
Remove Cc:
Add AdminCc:
Remove AdminCc:

Make subject:
Make priority:
Make queue:
Make Status:
Make date Starts:
Make date Started:
Make date Told:
Make date Due:
Make date Resolved:
X Add comments or replies to selected tickets
Update Type:
Subject:
Attach:
Message:
X Edit Links
Enter tickets or URIs to link tickets to. Separate multiple entries with
spaces.
Merge into: (only one ticket)
Depends on:
Depended on by:
Parents:
Children:
Refers to:
Referred to by:

but I’d really like (Ok, a queue owner who has MANY tickets to update in
a queue-and-department reorg would REALLY LIKE) a
X Custom Fields
CF1:
CF2:
. . . etc

option.

Thanks,
JB
JB Segal 617-886-5575 www.smartertravel.com
Systems/Network Admin. 465 Medford St. Ste 400 www.bookingbuddy.com
Smarter Living, Inc. Boston, MA 02129 www.tripmania.com

Search through the archives, someone contributed some code for this. I
didn’t save the URL, unfortunately, from when I grabbed it. However, I
didn’t like the code much, it didn’t work too well, so I just used an
idea or two and expanded it for my own use. I had originally included
this as another section on the bulk update page, but decided instead to
have a separate bulk CF update page. I think my code checks to make
sure that if you change a CF, that change only gets applied to the
queues it is associated with (e.g., your query returns tickets from more
than one queue).

Quoth Schultz, Eric (ESchultz@corp.untd.com):

Search through the archives, someone contributed some code for this. I
didn’t save the URL, unfortunately, from when I grabbed it. However, I
didn’t like the code much, it didn’t work too well, so I just used an
idea or two and expanded it for my own use. I had originally included
this as another section on the bulk update page, but decided instead to
have a separate bulk CF update page. I think my code checks to make
sure that if you change a CF, that change only gets applied to the
queues it is associated with (e.g., your query returns tickets from more
than one queue).

Are you able to publish your code?

Thanks,
JB
JB Segal 617-886-5575 www.smartertravel.com
Systems/Network Admin. 465 Medford St. Ste 400 www.bookingbuddy.com
Smarter Living, Inc. Boston, MA 02129 www.tripmania.com

I was going to put it on the Wiki since you asked, but it appears to
only allow me to paste in about half of what I want to. Are there some
sort of limitations on the number of characters I am allowed to put in
an article that I don’t know about? I’m just AnonymousGnome, maybe
that’s the problem?

Quoth JB Segal (jb@smarterliving.com):

Is there any way to update custom fields on a pile of tickets at once?

Alternately, is there any way to edit CF’s on the command line?

The book says that the commandline deals in TicketSQL (see Chapter 3),
and chapter 3 says “You can search for custom field values in the same
way as standard ticket attributes. Simply prefix the name of the custom
field with CF. to indicate to the TicketSQL parser that you are
searching over a custom field:
(status = ‘open’ OR status = ‘new’)
AND CF.Visibility != 'private”
(Page 46)

To me, this implies that CFs should be editable, too.

When looking at the query builder, I see that my CFs are listed as
"CustomField.{Field Name With Spaces}"
When I try to modify a ticket with
rt edit ticket/####
and I’m handed the edit screen into my editor, adding
CF.{Field Name}: True
or
CustomField.{Field Name}: True
or
CF.Field Name: True
or
CustomField.Field Name: True
or
CF.Field\ Name: True
or
CustomField:Field\ Name: True
all yield syntax errors.

Any ideas?

Thanks,
JB
JB Segal 617-886-5575 www.smartertravel.com
Systems/Network Admin. 465 Medford St. Ste 400 www.bookingbuddy.com
Smarter Living, Inc. Boston, MA 02129 www.tripmania.com

JB Segal jb@smarterliving.com writes:

Is there any way to update custom fields on a pile of tickets at once?

I believe this is in 3.5 and the chaldea branch.

Last time I needed to do this, I wrote a quick perl script. I’ve
attached it.

seph

bulk-change-cf.pl (2.13 KB)