Jira Structure: Operator / does not work as expected

Hans-Arno Wegner November 30, 2018

Hi Experts,

I have the following problem:
In Structure I get the following results:
issuetype="Story" AND Status = "Closed" = 59
issuetype="Story" = 61

But when i try to calculate with them, it goes wrong:
(issuetype="Story" AND Status = "Closed") / (issuetype="Story") = 59

There should be a 0.97 (59/61) as result. It kind of ignores the second part. In the description it says that "/" turns the elements into values - so it should work.
What goes wrong here?

Ciao
Hans-Arno

1 answer

1 accepted

0 votes
Answer accepted
Egor Tasa [ALM Works]
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.
November 30, 2018

Hi Hans-Arno,

This is a strange situation, I have several similar calculations in my own Structure and they work fine, so we'll have to investigate your case in more details. Could you let me know, how exactly are you calculating the ratio? Could you provide the exact formula?

Regards,
Egor Tasa

ALM Works Support

Hans-Arno Wegner November 30, 2018

Hi Egor, thanks for the quick answer!

This was already nearly the exact formula. I already tried it out with different approaches (only status oriented, on one side stories on one side status... it never worked.

My intention was to just have the percentage of closed stories to not closed.

This is the current used approach:
IF(issuetype="Story"; (issuetype="Story" AND Status = "Closed") / (issuetype="Story") )

Plus: Sum over sub-items
(And I would use percentage of course)

As already told, each side works well alone. But not put together with /

Egor Tasa [ALM Works]
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.
November 30, 2018

Thank you, Hans-Arno,

Am I correct, that you are then summing over sub-items? If so, what is happening is you get the value calculated for each story, so it is 1 for story in closed status (1/1) and 0 for story in any other status (0/1). Then you calculate the sum over sub-items and get the number of stories in closed status.

What you aim at, I believe is 

SUM{issuetype="Story" and status = "Closed"}/SUM{issuetype="Story"}

Note, that you do not need to sum over sub items in this case, as aggregation functions take care of it. 

There are other ways to achieve the same result, but this is probably the easiest.  

Please, let me know if it helps.

Regards,
Egor

Hans-Arno Wegner November 30, 2018

This is one of the approaches I tried out before too. And yes, then without the sum-over... option.
(first I answert, it still not works but then I realized: My fault. I forgot to change the number of digits. Ooops.)

I thought that I tried this out, but now it works thank you very much!!

(I still not understand why it not worked with the sum-over addition, but this is ok)

Egor Tasa [ALM Works]
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.
November 30, 2018

Hi Hans-Arno,

This may be a result of rounding. Can you check if your formula format is Number and Rounding is to 0 or 1 decimal places?

Regards,
Egor

Hans-Arno Wegner November 30, 2018

Yes I already recognized it by myself :)
Thanks a lot

Egor Tasa [ALM Works]
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.
November 30, 2018

Glad I could help

Hans-Arno Wegner November 30, 2018

Ah, I think I know now, why my former similar formula didn't work:
I used "SUM( )" instead of SUM{ }"

Suggest an answer

Log in or Sign up to answer