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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

354 views 0 6
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