Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

With ScriptRunner Enhanced Search, users can utilize JQL functions and save them as filters for use in Atlassian's JQL search.
This means that you will be able to use it with TISSUE Cloud! (smile)

Background

To give a comprehensive background, users can refer to Atlassian’s example of how SQL joins works.

SQL Join.pngImage Removed

Example

Table 1

Key

Summary

Linked Issue

TASK-1

To perform UAT

Subtasks-1

TASK-2

To scan for bugs

Subtasks-2

Table 2

Key

Summary

Linked Issue

TASK-2

To scan for bugs

Subtasks-2

TASK-3

To deploy to production

TASK-4

To standby for issues

Subtasks-2

How the tables will look in TISSUE gadget and ScriptRunner’s Enhanced Search

TISSUE Gadget is configured to work like a 'Left Join,' which means that all rows from the left table (Table 1) will be displayed, even if there is no matching value in the right table (Table 2).
Any missing data from the right table will show as empty values.

Left Join (Used by TISSUE gadget

It is possible to achieve this feature directly by setting the “Hide Incomplete Rows“ preference in the gadget.

For details, please refer to Release Notes for 3.5.0.

Introduction

The Tissue Gadget use the issues from the primary set of issues to join up with linked issues from the secondary set of issues.
It will display blank values when there is no linked issues. This is similar to a Left Join in database terminology.

In some cases, the users may only want to display rows which have matching linked issues.
The Inner Join will skip those issues in the primary set of issues which does not have linked issues

SQL Join.pngImage Added

Example

Primary Set of Issues (Epics)

Key

Epic Name

Linked Issue

TIS-100

TIS bug fix

CS-18

TIS-99

TIS feature improvement

CS-10

TIS-98

TIS UI improvement

CS-15

TIS-20

TIS performance fix

Secondary Set of Issues (Feature request to be linked to epics)

Key

Summary

Status

CS-18

TypeError when the issue data does not contain issuelinks field

Pending Dev

CS-15

To allow multiple link types for each level

Pending Dev

CS-10

To unescape the title which contains special characters

Pending Dev

How the different join looks like

Left Join (Default)

TASK1

Key

Summary

Linked Issue

Status

TIS-

To perform UAT

Subtasks-1

TASK-2

To scan for bugs

Subtasks-2

TASK-4

To standby for issues

Subtasks-2

TASK-3

To deploy to production

ScriptRunner’s Enhanced Search, using an 'Inner Join,' will only display rows where there is a match between the two tables. If there are no matching records, those rows will be excluded from the result, meaning rows with empty values won't be shown

Inner Join (Possible through the use of ScriptRunner’s Enhanced Search)

100

TIS bug fix

CS-18

Pending Dev

TIS-99

TIS feature improvement

CS-10

Pending Dev

TIS-98

TIS UI improvement

CS-15

Pending Dev

TIS-20

TIS performance fix

Left Join.pngImage Added

Inner Join

Key

Summary

Linked Issue

TASK-1

To perform UAT

Subtasks-1

TASK-2

To scan for bugs

Subtasks-2

TASK-4

To standby for issues

Subtasks-2

Steps to achieve Inner Join

Status

TIS-100

TIS bug fix

CS-18

Pending Dev

TIS-99

TIS feature improvement

CS-10

Pending Dev

TIS-98

TIS UI improvement

CS-15

Pending Dev

The row containing TIS-20 is omitted because no issues are linked to it

Inner Join.pngImage Added

How to achieve Inner Join

The trick is use the LinkedIssuesOf JQL function (from ScriptRunner Enhanced Search) on the primary set of issues.
It is possible to apply filtering to exclude issues with no matching linked issues.

There are 2 parts

1. Create a JQL filter for the primary set of issues

  1. Head to ScriptRunner Enhanced Search from the Apps menu

    ScriptRunner Enhanced Search.pngImage RemovedScriptRunner Enhanced Search.pngImage Added

  2. Enter your JQL

    JQL Search.pngImage Removed

  3. Check that the issues displayed are what you expect

    JQL Search Results.pngImage Removed

  4. Save JQL as a filter

    Save JQL Search as Filter.pngImage Removed

    Specify the JQL to fetch the linked issues as the parameter for the linkedIssuesOf function

    1. E.g. Fetching linked issues with the status Awaiting Dev and Link Issue Type = is related to

      Code Block
      issueFunction in linkedIssuesOf(status in ("Awaiting Dev"), "is related to")

  5. It should display only those issues that have links. You may also add more conditions to do filtering on the primary set of issues.

    JQL Search Results.pngImage Added

  6. Click Save as Filter button to save the JQL as a filter to use it in TISSUE

    JQL Search.pngImage Added

  7. Update the filter options as required

    Save Filter Options.pngImage Removed

    Save Filter Options.pngImage Added

Tip

You can choose another meaningful name for your Filter.

2. Use the Filter in Tissue Gadget

  1. Use the new created filter in TISSUE by modifying using the JQL command below

Code Block
filter = <"YourCreatedFilterName">

Adding JQL to TISSUE.pngImage Removed

  • You will be able to see the same results shown in Step 3 in your TISSUE Gadget

  • Before using Enhanced Search

    After using Enhanced Search

    Not using Enhanced Search.pngImage Removed

    Using Enhanced Search.pngImage RemovedAdding JQL to TISSUE.pngImage Added

    1. Now, the Tissue gadget will only display issues with linked issues

    Inner Join.pngImage Added

    Reference