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 sub-task type creation depending on parent issue type

I suppose that you have one issue task called "Sub-task" and you want to restrict its creation only to "Task" parent issue types. In that case you have to add validator to transition "Create Issue" of the workflow used by "Sub-task", with the following configuration:

 


Text to be parsed is: %{00014} = "Sub-task" IMPLIES %{00040} = "Task"


Note that:

  • %{00014} is field code for "Issue type"
  • %{00040} is field code for for "Parent's issue type"
  • Logical connective IMPLIES is available since version 2.1.22. If you have installed a previous version, you can use the following equivalent expression: %{00014} != "Sub-task" OR %{00040} = "Task"


Once configured, transition Create Issue will look like this:


Other variation of the usage example

Avoid any type of sub-task creation only to parent issue types "Bug" and "Enhancement"

%{00041} = null IMPLIES %{00040} not in ["Bug", "Enhancement"]

being %{00041} field code for field "Parent's issue key"

an equivalent expression without using connective IMPLIES and operator NOT IN:

%{00041} != null OR %{00040} != "Bug" AND %{00040} != "Enhancement"


Avoid "Sub-task" type creation only to parent issue types "Bug" and "Enhancement"

%{00014} = "Sub-task" IMPLIES %{00040} not in ["Bug", "Enhancement"]

or an equivalent expression without using connective IMPLIES and operator NOT IN:

%{00041} != "Sub-task" OR %{00040} != "Bug" AND %{00040} != "Enhancement"


Limit "Sub-task" type creation only to parent issue type "Task", and "Agile Sub-task" type creation only to parent issue types "Story" and "Epic"

(%{00014} = "Sub-task" IMPLIES %{00040} in ["Task"]) AND (%{00014} = "Agile Sub-task" IMPLIES %{00040} in ["Story", "Epic"])

or an equivalent expression without using connective IMPLIES and operator IN:

(%{00014} != "Sub-task" OR %{00040} = "Task") AND (%{00014} != "Agile Sub-task" OR %{00040} = "Epic" OR %{00040} = "Story")




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 = "sub-task"