[rt-users] How can I get the value from a custom field from the command line

Thomas Sibley trs at bestpractical.com
Fri Sep 14 13:48:30 EDT 2012


On 09/14/2012 12:03 AM, Hans Vos | Drecomm wrote:
> I have found that you can set the custom field value for a ticket with
> the following command:
> 
> rt edit -t ticket [ID] set CF-[ID]='value'
> 
> Where the first ID is the ticket number and second ID is the number of
> the custom field.

You can use the CF Name instead of ID just fine above.  If it contains
any special characters, you'll need to use CF.{Name Here} syntax, and of
course quote it properly for your shell.

Names are preferred to IDs in almost all cases of user interaction.

> However you cannot use the same syntax to retrieve the value, like:
> 
> rt show -t ticket -f CF-[ID] [ID]

You're not expected to know CF numeric IDs, so no, this doesn't work.

> However, it does work when you use the custom field name instead of the
> ID, like:
> 
> rt show -t ticket -f CF-[Name] [ID]
> 
> Is this a bug?

No.




More information about the rt-users mailing list