[Rt-devel] Re: REST API - Does not error check custom field
values (RT version3.6.4)
Jesse Vincent
jesse at bestpractical.com
Sun Oct 28 22:32:34 EDT 2007
[For the record, I think this rocks. It's not been applied to 3.7 yet
because we're crazy busy with about a dozen other projects. But don't
let that distract you from Philip's excellent work]
On Sun, Oct 28, 2007 at 07:28:27PM -0700, Philip Kime wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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.
>
> PK
>
More information about the Rt-devel
mailing list