Validating data before saving issue in Jira 5

Hello, I'm trying to write plugin to validate data before saving an issue. I don't want workflow validation, but validation before saving.

I'm not really sure with what kind of plugin module I can do that. How can I catch the data just before it is saved and then reject the saving in case data does not match the required criteria?

1 answer

You just want a standard validator module...

That validates data before saving. Not sure what you mean by saying you don't want workflow validation.

Hello Jamie,

I mean that I want to perform validation right away when user changes the content of some filed. If the content is not right the changes should not be made to the issue.

From what I see workflow validation is performed when issue changes its state in the workflow. I want the validation to work even if the workflow transitions are not made.

Hi Andrej,

OK... your options are using javascript then, or, this is what the behaviours plugin was written for: .


I have also installed the Behaviours plugin, but I was unable to use it on Jira 5. I get an exeption when clicking the "Fields" link when editing new behaviour. I see somone had already entered an issue about that:

I tried downloading the source of Behaviours plugin too and compiling it myself but I'm not able to get it to work at all in that case. I don't get any errors during compilation, but when I install the JAR into Jira the first thing I see is that there are only 17 modules in the plugin while the binary version has 18. When I try to go to behaviours panel I get an exection right away, before I even see the "Fields" link.

I may not be building it correctly, I'm building it with JDK1.6.0_25 and atlassian-plugin-sdk-3.7.2 using the following commands to create the JAR file:


From what I see the following line is missing at the start of the the getAllFields function in ViewBehaviours.groovy file:

ComponentManager componentManager = ComponentManager.getInstance()

The problem is, i'm not able to install the plugin that i build myself correctly, so either i'm doing something wrong when building it or something is missing from the source.

Yes you're quite right... I forgot you were using jira 5. I will be updating this shortly.

I don't think you're building it wrong, it's just that I don't think it's compatible with rc3... it was working for beta2. Will get back here when I can.

Thank you very much for your answers Jamie. I will wait then till the new version of Behaviours plugin comes out.

I'm still testing and this won't be the final version for jira5, but I've attached a (more) working version to

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Sunday in Feedback & Announcements

How do you analyze GC logs, thread dumps and head dumps?

Hi awesome community!  In this article, I would like to describe the one of the toolset (service) for the analyze some problems on different Java-based instances, of course, as Atlassian admini...

124 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you