wiki:BasicFieldValidationPatch

Required Field Validation in Trac

Notice: This plugin is deprecated. Please use the TicketValidatorPlugin.

Description

With these few simple changes, you can designate ticket fields (including custom ticket fields) as required in the trac.ini file.

Bugs/Feature Requests

Existing bugs and feature requests for BasicFieldValidationPatch are here.

If you have any issues, create a new ticket.

Instructions

Download the source, unzip to a temporary location, and copy the api.py, model.py, and web_ui.py files into yourpythoninstallation/lib/site-packages/trac/ticket

Note that these changes were made to the 0_9_5 source. If you've got a different version and want to see what the specific changes are in order to make them by hand, check out revision [857]. (Note: I've successfully applied the patch in [857] to the 0_10_4 source, it was very straightforward - anonymous.)

Download

Download the zipped source from here.

Source

You can check out BasicFieldValidationPatch from here using Subversion, or browse the source with Trac.

Example

Once you've patched the three python files you can use this patch by adding fieldname.required = true to the trac.ini file:

[ticket]
milestone.required = true

Recent Changes

[857] by sambloomquist on 2006-06-13 20:14:18
BasicFieldValidationPatch:

fixes #438

[856] by sambloomquist on 2006-06-13 20:13:07
BasicFieldValidationPatch:

refs #438

[855] by sambloomquist on 2006-06-13 19:53:57
New hack BasicFieldValidationPatch, created by sambloomquist

Author/Contributors

Author: sambloomquist
Maintainer: none (deprecated)
Contributors:

Last modified 11 months ago Last modified on May 21, 2013 1:36:16 AM