Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

@@Formula not working

Raiza Martins Dias June 11, 2013
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

0 votes
David Fischer June 12, 2013

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

0 votes
David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2013

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.

Raiza Martins Dias June 11, 2013

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);

0 votes
Raiza Martins Dias June 11, 2013

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);

0 votes
David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2013

The formula is not showing in your question...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events