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.

 

0 vote

"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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

179 views 0 4
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