Jira static type checking error after upgrade to JIRA 7

Dear Support-Team

after an upgrade to JIRA 7.2 we installed and bought a ScriptRunner 4.3.18 licence, we have static type checking errors found in in the condition bei the 'send a custom email' workflow post function.

 

jira static type checking cannot find matching method java.lang.object#compareto(int)
cfValues['Duration (mins)'] >= 30 && '.' in cfValues['Projects']*.value ||
cfValues['Duration (mins)'] >= 30 && '.' in cfValues['Projects']*.value ||
cfValues['Duration (mins)'] >= 30 && '.' in cfValues['Projects']*.value ||
cfValues['Duration (mins)'] >= 30 && '.' in cfValues['Projects']*.value ||
cfValues['Duration (mins)'] >= 30 && '.' in cfValues['Projects']*.value

 

Duration (mins) is a calculated number field:

<!-- @@Formula: issue.get("customfield_15127")==null ? null : (issue.get("customfield_15127").getTime() - issue.get("customfield_15126").getTime()) / 1000 / 60 -->
customfield_15127, 6 are Date Time Picker. 

Can you help us?

Regards,

Tatiana

2 answers

Hi Tatiana,

Static Type Checking errors are not always right.  So just give it a go and see if it actually fails or not.

 

"calculated number field" from JMWE plugin probably declares itself as an object, hence ScriptRunner thinks it's an object.

You could use a Script Field instead which had support for Durations. 

Or you can just ignore it as Thanos says, it will work.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

441 views 8 26
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