[Rt-devel] Opinions on adding CF validation to REST interface

Philip Kime pkime at Shopzilla.com
Sat Dec 23 20:19:07 EST 2006


I need to have the REST interface enforce various CF things like:
 
* Mandatory CFs
* CF validation other than mandatory
* Reject CF values for Select* fields which are not valid for the field
 
I have all of this working for AT and am working on adding it to RT (for
tickets anyway). I will submit a patch when done. I wanted to get
opinions on this though:
 
When creating a thing (asset, ticket etc.). The current behaviour I have
is:
 
* If a mandatory CF is not present, give error and don't create.
* If a CF isn't mandatory but a/the passed value doesn't match the
validation string, don't update the CF but still create the object.
* If a Select* CF has no validation string but a/the passed value
doesn't match any of the possible values, don't update the CF but still
create the object.
 
I was wondering if this was reasonable? I am in two minds about
rejecting all creation attempts by REST which fail any of these
criteria. The mandatory case if obvious - that's what mandatory means
and this is really important for things like SOX audit - you simply must
be unable to create something without the mandatory CFs. But the other
two cases are less obvious. The GUI won't let you create these last two
so I supose it should be consistent.
 
 
PK
 
--
Philip Kime
NOPS Systems Architect
310 401 0407
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20061223/abe8b541/attachment.htm


More information about the Rt-devel mailing list