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

Philip Kime Philip at kime.org.uk
Sun Oct 28 22:28:27 EDT 2007

Hash: SHA1

I recently developed a replacement for the validation core code, 
including the functionality you are talking about:

* All interfaces (REST/Email/Web) check for valid values for Select* CFs
* De-coupled mandatory status for CFs from validation string (seperate 
checkbox for mandatory now)
* Better error messages in REST for not matching validation regexps

I have attached a zip so you can try this out. See the README.txt file 
for details but basically just drop the files included in as local 
overlays in the paths indicated. Won't overwrite any of your RT install 
(unless you already have local mods to these files in which case you'll 
have to merge them. The README.txt gives some details on what was 
changed in each file). You can just delete the files to backout (unless, 
again, you already have local mods). These files are against 3.6.5 but I 
think they should be fine against 3.6.4.

Bear in mind that if you designate a CF mandatory, opening a ticket via 
email without using something like the CommandByMail extension to 
specify the mandatory CF value will fail (as it should). If you use 
CommandByMail, I have a patch for that too.

I did this for audit requirements - they wanted to see enforcement of 
mandatory information in certain queues for opened tickets. You simply 
can't guarantee this without changing the core code for validation etc. 
I de-coupled validation strings and mandatory status so you can have 
non-mandatory, validated fields and clean way for doing mandatory fields 
which don't match a pattern (rather than the inelegant way of making 
them match an "anything" pattern).

Let me know how you get on.


- -- 
Dr Philip L Kime

Version: PGP Desktop 9.6.3 (Build 3017)
Charset: ISO-8859-1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rt-mandatory.tar.gz
Type: application/x-gzip
Size: 16095 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20071028/15981a33/rt-mandatory.tar.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rt-mandatory.tar.gz.sig
Type: application/octet-stream
Size: 66 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20071028/15981a33/rt-mandatory.tar.gz.obj

More information about the Rt-devel mailing list