This workaround is meant to help projects where it is necessary to calculate text fields linked to numeric variables for the sum of a score. In this documentation, I used ProForma with Automation For Jira(A4J). Also, I used as an example a form related to a questionnaire on basic health care and in which it calculates a score for each section and at the end makes a total sum. This method can be used for other purposes (eg. true or false test).
Important related documentation:
Building Forms in ProForma
Working with Service Projects
Working with Software & Business Projects
ProForma & A4J
How AFJ works
Smart values
{{#=}}IF({{issue.customfield_XXXXX.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_XXXXX.value.endsWith("Yes")|false}}{{/}}
{{#=}}IF({{issue.customfield_10062.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10063.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10064.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10065.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10066.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10067.value.endsWith("Yes")|false}}, 1, 0){{/}
{{#=}}IF({{issue.customfield_10068.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10069.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10072.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10073.value.endsWith("Yes")|false}}, 1, 0){{/}}
{{#=}}IF({{issue.customfield_10075.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10076.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10077.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10078.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10079.value.endsWith("Yes")|false}}, 1, 0)+IF({{issue.customfield_10080.value.endsWith("Yes")|false}}, 1, 0){{/}}
{{#=}}{{issue.customfield_10071}}+{{issue.customfield_10074}}+{{issue.customfield_10081}}{{/}}
Note: To find the custom field ID please take a look at this documentation. Also, the values 1 and 0 can be changed for any value that you wish.
Bruno Altenhofen
Atlassian Engineer - The guy from Proforma(Jira Forms)
e-Core
Krakow - Poland
1 accepted answer
0 comments