Calculated custom field how to

arama mihai
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.
March 19, 2018

Hello,

I'm trying to make a calculated custom field, either text or number, using the "Misc custom fields" from Inovalog add-on.

The formula I'm using is:

for calculated number:

<!-- @@Formula: String issueType = issue.get("issuetype").getName().toString(); if (issueType.equals("ProgramEpic")) { return 1; } else if (issueType.equals("Epic")){ return 2; }  else if (issueType.equals("Story")){ return 3; }  else if (issueType.equals("EnablerStory")){ return 4; }  else if (issueType.equals("Defect")){ return 5; }  else if (issueType.equals("Sub-task")){ return 6; }

The field has the value, but when I do the query: Project = ABC order by Hierarchy ASC, it does not arrange them in order;

for calculated text:

<!-- @@Formula: String issueType = issue.get("issuetype").getName().toString(); if (issueType.equals("ProgramEpic")) { return "A"; } else if (issueType.equals("Epic")){ return "B"; }  else if (issueType.equals("Story")){ return "C"; }  else if (issueType.equals("EnablerStory")){ return "D"; }  else if (issueType.equals("Defect")){ return "E"; }  else if (issueType.equals("Sub-task")){ return "F"; }

This does not even add a value into the field.

Please let me know what the correct formula would be, or , for the number field, if it is correct, why does the order by does not work.

Thank you.

1 answer

1 accepted

0 votes
Answer accepted
arama mihai
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.
March 23, 2018

A reindex was needed.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events