which type plugin should i select if i want to make some pre-check before normal creation of an issue?

linqiang June 2, 2014

which type plugin should i select if i want to make some pre-check before normal creation of an issue?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2014

Until you've started to create an issue, there is nothing you can check.

So the answer here is "none, because it's a logical impossibility". You can use validators on the "create" transition to validate that a user is entering valid data, but, of course, that's done as they enter the issue,

linqiang June 2, 2014

thanks for your comments, i want to check whether the user have already create an issue in some project, which i limit only one per user, any ideas?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2014

I can think of a couple of ways of approaching this scenario actually.

One is to have a specific role of "creator" in the project, with "create issue permission" set and with your user in it. Then you write a listener that picks up "create", checks to see if they've gone over whatever limit you want to set on them and removes them from the role. This is the prettiest way to do it because it'll simply dump their "create" rights, they won't be able to create any issues in that project.

The other approach is the validator I already mentioned. Let them create an issue, but have a bit of code that searches for their other issues and if it finds them, returns "false" with a message to tell them they're over their create limit.

I suspect you can do either of these with the script runner plugin (Certainly the validator can be done!)

linqiang June 3, 2014

thanks for your ideas, actually i have do that with groovy in script runner, but it based each workflow, what i wanted is do the check across the workflows, that's not bound with only certain workflow.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2014

Workflows are independent of each other. You'll need to add this to each one as appropriate.

Suggest an answer

Log in or Sign up to answer