So I wrote a scripted condition to prohibit a particular workflow transition if the assignee has not commented on it. ( I check for a particular value in a custom field, and if the test is true, I look at the list of comments and check that the getAuthor of the last one equals the issue.Assignee.)
It works well enough, but the problem is, when the transition is prohibited, of course, you don't see it in the list. So, if you go to open the Conditions Validator to see why the transition doesn't show, then the system throws a NullPointer exception, because there is no getHtml method to fill it in.
Here is the actual message that comes back:
Error rendering WebPanel (viewissue/activityblock.vm): org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in class com.intenso.jira.plugins.condval.issuetabpanel.ConditionsValidatorAction threw exception java.lang.NullPointerException at viewissue/activityblock.vm[line 50, column 23]
So we need this method for Jira to call, and some way to fill it in with the relevant stuff for the Conditions Validator. Is that already in the package and I missed it?
Steven
What version of script runner are you using... I fixed a problem where it was not working with the Intenso conditions validator some time back.
Happens that the Conditions Validator is 1.3.2; there is a 2.0.5 available for that. I will try upgrading and see what happens.
Our Jira instance is 5.0.7 right now, but we will shortly upgrade that as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, more information: I upgraded the Intenso conditions validator to version 2.0.5, same as what we have in the production instance, and the problem still appears anytime you open the conditions validator in the step where this scripted condition appears. Doesn't matter if the script is returning "true" or "false" either, of course.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post the full stack trace.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll take a look at it 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.
We don't have any place on the Scripted Condition field to add a text description of what the condition is. Apparently Conditions Validator expects getHtml() to return such a description for use in its own display of passes and fails.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you can't enter it, but the plugin provides one. It's what you see when looking at the conditions in the workflow editor, text mode. The problem is the NPE... not sure why it's caused, will look in to it.
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.