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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrej,
OK... your options are using javascript then, or, this is what the behaviours plugin was written for: https://studio.plugins.atlassian.com/wiki/display/JBHV/JIRA+Behaviours+Plugin .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
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:
atlas-compile.bat
atlas-package.bat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your answers Jamie. I will wait then till the new version of Behaviours plugin comes out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm still testing and this won't be the final version for jira5, but I've attached a (more) working version to https://studio.plugins.atlassian.com/browse/JBHV-100.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.