Versions Compared

Key

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

Table of Contents
maxLevel1

Section
Column
width30%
Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents

Column



Example: Restrict parent issue from closing if it has sub-tasks that were created during a given parent issue status

If sub-tasks are raised while the parent is at a status of "Released", the parent cannot be moved to status "Closed" until all sub-tasks are closed. 

I believe this will require a new custom field to be populated automatically during the sub-task's "Create" step that contains the parent issue's status.

The logic should then check if parent issue status field in sub-task = "Released" and if so, require it to be closed before the parent can be closed.

Create a "Text field (single line)" custom field in sub-task issue called "Parent status at sub-task's creation"


Insert post-function Copy a parsed text to a field into sub-task's "Create Issue" with the following configuration:


Note that:

  • %{00042} is field code for "Parent's issue status" virtual field
  • Beware to introduce that post-function after "Creates the issue originally" system post-function


Insert Boolean validator with math, date-time or text-string terms validator into "Close issue" transition in parent's workflow with the following configuration:


Boolean expression used is: count(filterByPredicate(subtasks(), ^%{11900} = "Released" AND ^%{00016} != "Closed")) = 0


Note that:

  • %{11900} is field code for "Parent status at subtask's creation" custom field in my particular JIRA instance. You should replace 11900 with the field code in your Jira instance
  • %{00016} is field code for "Issue status"


Other examples of that functions

Boolean validator with math, date-time or text-string terms

Incoming Links
pageBoolean condition and validator with math, date-time or text-string terms
labelsexample


Copy a parsed text to a field

Incoming Links
pageCopy parsed text to a field
labelsexample

Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label in ("sub-task","transition")