Using the CLI to create a ticket with custom fields

Hi everybody,

I am trying to create a ticket from the CLI that includes customs fields.

rt create -t ticket set subject=“Test ticket created with CLI” set
queue=Sistemas set CF.{Tipo}=Incidencia

The ticket is created buy I get an error message about the custom field:

Invalid custom field name (tipo)

Actually the custom field content is not set in the ticket.

I have also tried using the CLI edit option but I get the same error (also
letting the editor that pop up and filling the CF):

[alcachi@rt ~]$ rt edit ticket/28302 set CF.{Tipo}=‘Incidencia’

tipo: Unknown custom field.

id: ticket/28302
cf.{tipo}: Incidencia

I have checked the name of the CF is right because if I set the CF from the
web interface and the use the show CLI option it works fine:

[alcachi@rt ~]$ rt show ticket/28302 -f CF.{Tipo}
id: ticket/28302
CF.{Tipo}: Incidencia

I am using an old version of RT (3.8.9). Does the CLI support creating
tickets with custom fields?

Thanks in advance

I have solved the issue referencing the custom fields by number as suggested
in the wiki:

rt edit ticket/28302 set CF-20=‘Bajo’

In the future I will try to move to the Perl RT API as suggested in the

View this message in context:

I use the following syntax with rt and it works on 4.2.7:
“CF-Request Type=value”


Daniel, thanks for your answer.

I have tried but in 3.8.9 it seems it is not working. In any case it is good
to know that we will be able to reference CF by name once we upgrade.

View this message in context: