Versions Compared

Key

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

Problem

An issue can be closed while dependent issues, such as child or linked issues, are still open.

Solution

You can add To address this, you can implement a SIL™ condition on the Close transition, which verifies . This condition checks the status of all dependent related issues (both child and linked issues). If any of the dependent these issues is not already closedstill open, the condition returns will return a false response.

Determine which

Identify restricting dependent issues

can limit transition

In this example, it's necessary to have all subtasks must be closed before an issue can be closedclosing the main issue.

Add a new condition

Log in as an administrator and go to Administration > Workflows.

Edit the Close Issue transition of in your Jira workflow.

Image RemovedImage Added

On the Conditions tab, click Add.

Image RemovedImage Added

Select (k) SIL Condition and then click Add.

Image RemovedImage Added

The Add Parameters To Condition page is displayed.

Writing the SIL™ code

In the SIL™ code editor, enter the following code:

Code Block
// get all subtasks
string s_tasks=subtasks(key);

// process each subtask
for(string s in s_tasks)
// if subtasks' status is not closed the transition cannot be available and therefore return false 
  if(%s%.status != "Closed")
    return false;

// if not failed yet then the transition should be available
return true;
Image RemovedImage Added

In the Name field, enter a name for your new program.

Info

It is recommended to choose Choose a name that is easy to identify.

Click CHECK to verify the code, and then click Add to save the condition.

Image RemovedImage Added

Next, publish your workflow.

For more information on activating workflows, go to the dedicated section in the Atlassian Documentation.

Table of Contents

Table of Contents