Forums

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

Custom Formula - Product discovery

Sarfaraz January 16, 2025

I am trying to calculate the Defect leakage for my project using the Custom formula,

I have defects identified in QA and in CT, and now i want to calculate the defect leakage using the below formula but not sure how do i put this in expressions

(Defects identified in CT/Defects identified in QA) * 100%

where CT and QA are my environment in which defects were identified

1 answer

0 votes
Dick
Community Champion
January 20, 2025

Hi @Sarfaraz , Welcome to the Atlassian Community.

In order to maximize your chances on a good answer, could you elaborate on your question. For starters, how is your project put together? How are QA and CT woven into this? It would give this community the information on how to approach the calculation you desire.

Kind regards,

Dick

Sarfaraz January 27, 2025 edited

Thank you @Dick for the response, sure let me tell you. I have a Kanbab project for the team. I have 2 custom fields created "Defects Identified in QA" and ""Defects Identified in CT" but referenced to the Project and Screen for use.

I had created an Automation to Calculate this in JIRA, this is what i gave

{"fields": {"Defect Leakage": "{{#=}}{{issue.Defects Identified in QA}} / {{issue.Defects Identified in CT}} * 100{{/}}"}}

I edited my custom fields above and gave them the value as 1.

When Automation fires where I gave a rule "When Issue is created" I get the below error

 

Unable to render smart values when executing this rule:
Unknown unary operator  at character position 8: 1.0 / * 100
All that I am trying to do is tell my leaders on defect leakage when code moved from QA to CT, how do i achieve this in JIRA
Like • Dick likes this
Dick
Community Champion
January 27, 2025 edited

Hi @Sarfaraz , 
Thank you for sharing your automation calculation. 
The error you face comes from a non-recognized referencing of the two custom fields. 

Please refer custom fields by using issue.customfield_xxxxx. The xxxxx is the ID of the custom field you're referring to. 

Also refer to the sum of the set of tickets using the suffix .size

The empty space between / and * in the log file indicates that there are no issues found for the denominator. You should check this in your automation to prevent division with 0. 

Kind regards,

Dick

 

Sarfaraz February 5, 2025

Thank you @Dick , really appreciate you telling this. I wanted to share one more things that i was able to find, probably very simple in calculating the Defect Leakage

There is a gadget called Issue Formula, this is a free Gadget

i gave 2 variables, Total Defects and Total Defects post release, this gadget has JQL function which i can use to query my project , a similar approach that is used to filter

once i create this variables within the gadget, i can simply give the formula

(total Defects post release / total Defects) * 100 and i am able to calculate my Defect leakage . this as well has a suffix input box where i can specify % as a value and i can get the value in %.. this is so easy and simple. wanted to share

Like • Dick likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events