Re: How to configure intelligence fields
[email protected] Wed, 20 Jul 2011 03:38:13 CDT
| Newsgroups | gmane.comp.java.jira.user |
|---|---|
| Message-ID | <11041048.994711311151123701.JavaMail.j2ee_forums.atlassian.com@atlassian12.managed.contegix.com> |
>You can also use Velocity templates in these fields which makes your changes easily portable across different JIRA versions." -->This means velocity code can be past inside default value? Exactly, yes. The message fields can be used for simple text or html, but the ability to use velocity inside them can be extremely powerful, and hence useful >"My requirement is once the user enter the invalid data inside the custome filed then i want show the error message while user going to the another filed in the same form. " That is a totally different question. Think through the process and break it into steps - user sees transition screen, user puts data in, user clicks "ok", server runs validation, server either (runs post functions to complete the transition || returns user to screen with a failed validation message) your original question was "that show warning message *before* to do any transition." The *before* problem is answered by putting some text on screen that will appear before the users do anything. You're now asking about *validation* which is about what the users have entered. Validation occurs when the users *try* to *commit* the change, not "before" anything. Jira has a simple validator system - after the user says "please do this", the workflow says "run any code that is in the validator slot". It expects a simple True/False response from each validator, and if any one of them returns a false, it returns the user back to the screen they were on with a simple "fields not valid" message. Good code in a validator will also return the field(s) that failed with a simple message which will be displayed as well - Jira will highlight these fields in red and give the message to the user. There is also a horrible hole in Jira in that the EDIT function does not provide any way to add validators. If you want to validate *before* the user commits, you need something dynamic, which basically means javascript. You can do what you want in javascript, with the slight caveat that any user who knows what they are doing can bypass it because it runs on their client, not the server. Three very quick points about javascript # The Behaviours plugin has been mentioned - this uses javascript and is a very powerful plugin that will save you a lot of time if you need to use it. # The message fields can be used to provide your javascript # Javascript runs on the client *before* the validators. You can't put stuff in a validator and try to run it later - the validators are not for that. I *think* you *could* write javascript that would detect the red boxes or feedback from a validator saying "no", but I haven't tried that. -- Post by broughn2 - online at: http://forums.atlassian.com/thread.jspa?forumID=46&threadID=55282 _______________________________________________ Jira-user mailing list [email protected] To unsubscribe or change your options visit this page: http://lists.atlassian.com/mailman/listinfo/jira-user