Forums

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

Need to Count the Linked issues to BUG based on Name

Sanjivani Wayal
Contributor
September 21, 2023

Hi,

I have a Bug to which some test cases and Test plans are linked using same link name, i have created a custom field in which through automation i need how many test cases are linked to that BUG (only test cases no other issue type) and it should increase whenever Test case is linked to BUG, is there a way to get count of linked issues based on name i know  linkedIssues({{issue.issueType.name}}) but how can i use and count it in Automation ?

1 answer

1 accepted

0 votes
Answer accepted
Pasam Venkateshwarrao
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.
September 21, 2023

Hi @Sanjivani Wayal 

 

try using the below smart values 

 

  • Total number of issues: {{issue.issuelinks.size}} 
  • Total number of resolved issues:  {{lookupIssues.size}}
    • Prior of placing the above value, create a lookupissue with the following jql issue in linkedIssues({{issue.key}}) and resolution = unresolved
Bill Sheboy
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.
September 21, 2023

Hi @Sanjivani Wayal 

Adding to the answer from @Pasam Venkateshwarrao ...

You could use Lookup Issues with JQL, checking the issuetype matches what you need.

I believe you could also use smart value, list filtering and a math expression on the {{issue.issuelinks}} smart value to count these in one step.

Kind regards,
Bill

Sanjivani Wayal
Contributor
September 24, 2023

So can i use if {{issue.issuelinks}} > 0 for checking linked issue but then how can i check if the linked issue is issuetype = test case? As i want to take in field that how many testcases are attached to a BUG?

Bill Sheboy
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.
September 25, 2023

As already described, you may do this in two steps: gather the issues with the JQL to filter on the issue type to store the results with Lookup issues, and then check the count with {{lookupIssues.size}}

Sanjivani Wayal
Contributor
September 28, 2023

Resolved my issue.Thanks for the help

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events