Versions Compared

Key

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


Section


Column
width30%600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Example: Block a transition until all subtasks have certains fields populated

I have a parent issue (issue type A) and this issue could have sub-tasks (issue type B). The sub-tasks have two custom fields (one custom field is an user picker custom field, "user", and the other custom field is a date picker custom field, "date").

I want to allow certain workflow transition in "issue A" only if all their sub-tasks have a value on custom fields "user" and "date". Basically, I want to know if sub-tasks's custom fields are not empty as a condition of issue workflow transition for "issue A".


Using Jira Workflow Toolbox a condition or a validation can be implemented, so that you can prevent a transition from being executed while there are sub-tasks that don't have certain fields populated. Let's see an example:

To implement this example we are going to use Boolean validator with math, date-time or text-string terms with the following configuration:

Image RemovedImage Added


Boolean expression used is: 

count(filterByFieldValue(filterByFieldValue(subtasks(), %{00070}, !=, ""), %{00012}, !=, "")) = count(subtasks())


Note that:

  • %{00070} is code for string value of "Environment"
  • %{00012} is code for string value of "Due date"

This example, can be extended to any number of fields and custom fields, and can also be restricted to certain types of subtasks using function filterByIssueType.



Other examples of that function

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



Related Usage Examples

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