#11978 closed task (worksforme)
How to use conditional validation
Reported by: | girish | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | DynamicFieldsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
I want to check that certain fields are not blank only for tickets with type enhancement. Can you explain how to do this in trac.ini ?. I tried using the example you have given, nbut it's not working for me.
Attachments (0)
Change History (7)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
[ticket-custom] keywords.invalid_if = keywords.invalid_when_type = enhancement
I get an error message even if ticket type is defect or anything else. I want keyword field mandatory only for ticket type enhancement.
comment:4 Changed 10 years ago by
Owner: | changed from Rob Guttman to Ryan J Ollos |
---|---|
Status: | new → accepted |
- Did you install from the dynamicfieldsplugin/0.11 or dynamicfieldsplugin/0.12 branch?
- Which Trac release are you running?
- What plugins do you have installed?
- If you view the page source (CTRL + U in firefox), do you find
dynfields.js
,layout.js
andrules.js
?
I tested the 0.11 and 0.12 branches with Trac 1.0.2beta1. The configuration you posted in comment:2 works on the 0.11 branch, but not the 0.12 branch. I will try to the issue fixed on the 0.12 branch soon.
comment:5 Changed 10 years ago by
The ValidateRule
was added in [10662] and the invalid_when
option was added in [11565]. These changesets were added to the 0.11 branch and haven't been merged to the 0.12 branch. I suggest using the 0.11 branch with all version of Trac >= 0.11 for now.
Since the 0.12 branch hasn't been maintained, we should probably just make a new 0.12 branch based on the current HEAD of 0.11, and backport the differences from the existing 0.12 branch.
comment:6 Changed 10 years ago by
Thanks. I will follow your suggestions and let you know if it is working
comment:7 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | accepted → closed |
See #12112, and please reopen if you continue to have trouble when installing from the 0.11 branch.
Please post the
[ticket-custom]
configuration you tried.