Versions Compared

Key

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

Problem

An issue should not be able to close if any of the can be closed while dependent issues, such as child or linked issues is not closed, are still open.

Solution

One will need to add To address this, you can implement a SIL™ condition on the close transition which will verify the statuses of all dependencies (Close transition. This condition checks the status of all related issues (both child and linked issues). If any of the dependencies is not already closed these issues is still open, the condition will return a false response.

Determine which dependencies need to restrict the transition

For the sake of this exercise we will consider that all subtasks need to be closed in order to let an issue to be closed

Identify restricting dependent issues

In this example, it's necessary to have all subtasks closed before closing the main issue.

Add a new condition

Log in as an administrator and navigate go to Administration - > Workflows and edit ".

Edit the Close Issue" transition on in your Jira workflow.

Image Removed

Press "Add a new condition" link.

Image Removed

Image Added

On the Conditions tab, click Add.

Image Added

Select (k) SIL™ SIL Condition and then press click Add.

Image RemovedImage Added

Writing the SIL™ code

The page Add Parameters To Condition appears. page is displayed.

Writing the SIL™ code

In the SIL™ code edit area insert 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;

The page should look like this:

Image RemovedIt is recommended to give the program a easy identifiable name in the Name field, press Image Added

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

Info

Choose a name that is easy to identify.

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

After saving the conditions of "Create Issue" should look like following:

Image Removed Info

Info

All you have to do now is to Image Added

Next, publish your workflow.

See more at Activating Workflow section on

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

Table of Contents

Table of Contents