Hello @Sanjivani Wayal
Is "test case" an issue type?
What do you want to do with the count after you have obtained it?
You could use the Lookup Issue action in an Automation Rule to get the number of issues of a particular type linked to a given issue. After executing the Lookup Issues action the number of issues in the result set can be obtained with the smart value {{lookupIssues.size}}
Hi @Trudy Claspill ,
Team wants to calculate how many testcases are attached to a bug (in a custom field) , yes i could use smart value {{lookupIssues.size}} but that will give me all the issues linked to BUG as we also have many test executions and other issues also linked, i particularly want to extract number of TESTCASES linked.
Iam looking how can we write in automation that the linked issue is a testcase?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is "test case" an issue type?
Do you use a unique link type only to link test cases to bugs, or do you use a link type that is also used to link other types of issues together.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill yes Test Case is issue type and team has already used same link for other issues types as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the ScriptRunner linkedIssuesOf() function to get a list of the issues.
issueFunction in linkedIssueOf("issue=the issue key for the Bug issue") and issuetype = "testcase"
Replace the issue key for the Bug issue with the actual issue key of the Bug issue for which you want to get the linked test cases.
Replace testcase with the actual name of your test case issue type.
That will get you a list of the linked test case for the specified Bug issue.
If you use that in a Lookup Issues action in an Automation rule then you can use the {{lookupIssues.size}} smart value to get the count of issues in the result set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill I tried to use the filter Project = "projectname" and issuetype = Test and issueFunction in linkedIssuesOf("issuekey")
and the automation as above its inserting some random value 100 and it updates the value in testcases and not in BUG issuetype
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please show us the exact filter that you created. Are you trying to use a smart value in that filter, or an explicit issue key?
Please show us the details of the Schedule trigger.
If your Schedule trigger includes a JQL then each action in the rule will be executed against each issue returned by that JQL. If you have added a JQL to the trigger that retrieves test cases, then it is the Test Case issues that will be updated by the Edit Issue action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.