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?
You just want a standard validator module... https://developer.atlassian.com/display/JIRADEV/Workflow+Plugin+Modules
That validates data before saving. Not sure what you mean by saying you don't want workflow validation.
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.
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: https://studio.plugins.atlassian.com/browse/JBHV-100
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.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG