You can now vote for scripts to help people know if they're useful or not. Login or create an account to vote!


Show the number of Linked Test Cases from the Issue


Add a field that shows the number of test cases linked to an issue.


I work in the QA team and would like to see the number of linked test cases for a given issue, allowing me to quickly see how many tests are related to an issue and filter by this.

Good to Know

  • Use 'Number Field' as the template for the custom script field.


  • Jira Jira (7.7 - 8.6)
  • ScriptRunner for Jira ScriptRunner for Jira (5.6.14)
import com.adaptavist.tm4j.api.service.common.ServiceResult import com.adaptavist.tm4j.api.service.tracelink.TraceLinkService import com.atlassian.jira.component.ComponentAccessor import com.onresolve.scriptrunner.runner.customisers.WithPlugin @WithPlugin('com.kanoah.test-manager') final userKey = 'someUserKey' def traceLinkService = ComponentAccessor.getOSGiComponentInstanceOfType(TraceLinkService) ServiceResult result = traceLinkService.getTestCaseTraceLinkCountByIssueId(userKey, result.valid ? result.result : 0
Discovered an issue? Report it here

Suggested for you

Appears in these Collections