[Rt-devel] REST API - Does not error check custom field values (RT version3.6.4)

Jeff Perry jeff at itasoftware.com
Wed Oct 17 16:07:48 EDT 2007


I don't know if this is true of all field types but I recently noticed
the following for a multi-select field.

The REST API seems to allow setting custom field values of type
multi-select to anything you like without any error.

The next time the ticket is edited using the Web UI, it catches the
problem and removes the incorrect values from the field. It helpfully
notes this action at the top of the page along with the other action
messages which is good.

To confirm this behavior you can use the unsupported bin/rt script to
edit a ticket, change a custom field to an invalid value using your
favorite editor, then save. Note that it is happy to let you do so. 

It would be nice to have the REST API return some sort of error
indicating the problem and which field or fields were invalid.
Alternatively, it would be handy if the RT API provided a convenient way
to request a list of valid values for a field and return this info. In
addition, it could return the regex for checking the field - if one has
been set by the user.

--Jeff




More information about the Rt-devel mailing list