My Behaviour script has stopped working since upgrade to 5.2.10

We have a simple script that takes a number from a field and populates another field with a URL based on this number. On our evaluation of 5.2.10 this is not working anymore and produces a strange error in the logs as follows:

2013-04-15 16:07:38,821 http-bio-8080-exec-10 ERROR jusername 967x3075x1 1kf3tlm 10.3.5.86,127.0.0.1 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.groovy.BehaviourManagerImpl] Found class but could not find method run

groovy.lang.MissingPropertyException: No such property: URL for class: com.onresolve.jira.groovy.user.FormField

Our validation script is quite simple as follows:

FormField orderID = getFieldById("customfield_10702")
String orderURL = orderID.getFormValue()
FormField URL = getFieldById("customfield_10900")

if (orderURL.isNumber()) {
 orderID.clearError()
 URL.setFormValue("https://domain.domain.com/CloneOrders/" + orderURL + "/") URL.setFormValue("" + orderURL + "/")

} else if (orderURL) {

 orderID.setError("Order ID must be numeric")
} else {
 orderID.clearError() 
 URL.setFormValue("")
}

Anyone have any idea what is going on here?

Thank you :)

1 answer

1 accepted

Accepted Answer
0 votes

I have solved my own issue. It appears the variable URL can not be used now in Behaviours since the upgrade for whatever reason. I have changed the variable name URL to something else and everything works now.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

2,543 views 5 6
Join discussion

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