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

358 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