@@Formula not working

Hi, I'm this formula it's not working. Does anyone have any clue of what's wrong? Log isn't showing any errors. Best regards, Raiza

4 answers

The formula is not showing in your question...

Sorry, formula is:

int qtdPFs = issue.get("customfield_12042");

int prazo = -1;

if (qtdPFs <= 10) {

prazo = 12;

} else if (qtdPFs > 10 && qtdPFs <= 20) {

prazo = 25;

} else if (qtdPFs > 20 && qtdPFs <= 30) {

prazo = 40;

} else if (qtdPFs > 30 && qtdPFs <= 40) {

prazo = 50;

} else {

prazo = new Double(Math.pow(value,0,36) *30).intValue();

}

org.apache.commons.lang.time.DateUtils.addDays(issue.get("customfield_10160"), prazo);

Which version of JMCF and JIRA are you using?

Also, I assume you are displaying the field in the view issue screen (at least for debug purposes)?

You should start by simply returning "1" to make sure your field is correctly configured, and build from there.

I'm using JIRA 5.2.2 and JMCF 1.5.5.

Field is in the view screen and it works with the formula:

int prazo= issue.get("customfield_12042");

org.apache.commons.lang.time.DateUtils.addDays(issue.get("customfield_10160"), prazo);

Well, I would then recommend that you progressively add lines in your formula until it stops working.

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...

478 views 8 28
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