Script Runner -- problem with a scripted condtion

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

1 answer

This widget could not be displayed.

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.

It's 2.0.7....

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.

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.

Can you post the full stack trace.

(trace.txt) Here ya go....

I'll take a look at it when I can.

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.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

489 views 3 18
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