Skip to end of metadata
Go to start of metadata

Table of Contents

Using JQL Functions

This page describes functions used for advanced searching within Jira. A function in JQL, which stands for Jira Query Language (not to be confused with Java Query Language), appears as a word followed by parentheses, which may contain one or more explicit values or Jira fields.

The functions described below are only applicable if Test Management for Jira is installed.

1. Click Issues > Search for Issues on the main toolbar.

The Search screen appears.

2. Click Advanced.

3. Fill in your desired JQL search using a JQL function, then click Search.

The issues matching the search criteria appear in the list.

Available JQL functions

hasTestCoverage()

Search for issues that are covered by test cases.

  • Syntax: hasTestCoverage()

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = MGS and issue in hasTestCoverage()

coveredBy()

Search for issues that are covered by test cases that have a specified testCaseKey.

  • Syntax: coveredBy([testCaseKey1], [testCaseKey2], [testCaseKeyN])

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = MGS and issue in coveredBy("MGS-T1")

coveredByTestCasesHavingField()

Search for issues that are covered by test cases that match the specified fields and values. Custom fields are supported.

  • Syntax: coveredByTestCasesHavingField([field], [value1], [value2], [valueN])

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Examples:

    • project = MGS and issue in coveredByTestCasesHavingField("status", "Draft")

    • project = MGS and issue in coveredByTestCasesHavingField("status", "Draft", "Approved")

    • project = MGS and issue in coveredByTestCasesHavingField("projectKey", "MGS")

    • project = MGS and issue in coveredByTestCasesHavingField("name", "Test case 1")

    • project = MGS and issue in coveredByTestCasesHavingField("priority", "High")

    • project = MGS and issue in coveredByTestCasesHavingField("component", "Turbopump")

    • project = MGS and issue in coveredByTestCasesHavingField("folder", "/Orbiter/Cargo bay")

    • project = MGS and issue in coveredByTestCasesHavingField("estimatedTime", "03:00")

    • project = MGS and issue in coveredByTestCasesHavingField("labels", "Smoke")

    • project = MGS and issue in coveredByTestCasesHavingField("owner", "vpelizza")

    • project = MGS and issue in coveredByTestCasesHavingField("Some Custom Field", "Some Value")

hasTestResult()

Search for issues covered by test cases that are linked with a test result.

  • Syntax: hasTestResult()

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasTestResult()

hasAllLastTestResults()

Search for issues covered by test cases that match the specified last test result statuses.

  • Syntax: hasAllLastTestResults([testResultStatus1],[testResultStatusN])

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasAllLastTestResults("Pass")

hasAnyLastTestResults()

Search for issues covered by test cases that match any of the specified last test-result statuses.

  • Syntax: hasAnyLastTestResults([testResultStatus1],[testResultStatusN])

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasAnyLastTestResults("Pass")

impactsTestResult()

Search for issues that impact test results.

  • Syntax: impactsTestResult()

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = MGS AND issue in impactsTestResult()

hasLinkedTestCycle()

Search for issues that are linked with a test cycle.

  • Syntax: hasLinkedTestCycle()

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasLinkedTestCycle()

hasAllLinkedTestCyclesWithAllLastTestResults()

Search for issues that are linked with a test cycle with test cases that match the specified last test-result statuses.

  • Syntax: hasAllLinkedTestCyclesWithAllLastTestResults()

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasAllLinkedTestCyclesWithAllLastTestResults("Pass")

hasAnyLinkedTestCycleWithAnyLastTestResult()

Search for issues that are linked with a test cycle that has test cases that match any of the specified last test-result statuses.

  • Syntax: hasAnyLinkedTestCycleWithAnyLastTestResult([testResultStatus1],[testResultStatusN])

  • Supported fields: Issue

  • Supported operators: IN , NOT IN

  • Example: project = project = MGS and issue in hasAnyLinkedTestCycleWithAnyLastTestResult("Pass")

Next Steps

Have a question for us?


  • No labels