Re: How to get transition name from current issue.

[email protected] Mon, 18 Jul 2011 06:58:23 CDT
Newsgroups gmane.comp.java.jira.user
Message-ID <9096375.936921310990334196.JavaMail.j2ee_forums.atlassian.com@atlassian12.managed.contegix.com>
Ok, so it's (mostly) the factory functions you're having the problem with, but you do still seem to be looking at transitions in the factory function when you shouldn't (because you don't have a transition when you're creating the configuration)

I would pare back what you've got, and forget about transitions *in the factory function*, because I think you're going nowhere with that.  You might want to revisit them if you really do need them (although I really doubt you do), but get the rest of it to work first.

First, get your factory function to work properly.  At the very least, start with one that asks the user for a hard-coded custom field and just exposes the list of options they can select.  That means getting that list in getVelocityParamsForEdit, reading it into the .vm as a select list and accepting the selection back from the users.   Jira will store that automatically for you when you can get it right.  

Once you've got that, you can move on to the validator itself, which will be able to read the stored values and use them to do the validation.

Have a look at the code in the "Jira Suite Utilities" - that has some very clear examples of validator code (they must be quite clear - I can understand them, and I'm not a coder)
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=55219
_______________________________________________
Jira-user mailing list
[email protected]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user