Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page properties
hiddentrue
Tech review

Status
colourGreenYellow
titledoneReady for review

Style guide

Status
colourGreenYellow
titledoneReady for review

Page status

Status
colourGreenYellow
titledoneReady for review

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Panel

On this page

Table of Contents
maxLevel2
exclude(On this page).*
stylecircle
typeflat
separatorpipe

UI Text Box
sizemedium
typeinfo

Probably most of the time, doing things with the help of JWT for Jira Cloud is related to a single object - the issue currently being transitioned, e.g. by adding a comment, updating a field, sending an email, etc.

Referring to the current issue's information can be done by using a simple field code like %{issue.description}.

However, since you can also use more complex functions in JWT that work with multiple objects, this simple notation is not sufficient for those use cases. To name a few examples

  • Creating sub-tasks based on the (dynamic) selection of components set in the current issue
  • Create a task for each issue returned by a JQL query (dynamic)
  • Create a set of three (static) stories in an Epic with distinct pieces of information

Whenever JWT for Jira Workflow Toolbox Cloud has to handle (or iterates over) multiple elements of Lists (or sources), those elements are referred to as seeds. Depending on the type of list, those are referred to as 

  • Seed issues - for elements of issue lists
  • Seed texts - for elements of text lists (e.g. custom field options, components etc.)
  • Seed numbers - for elements of number liststhe numbers from one to a given number


Seed issues

Issue lists can be specified by JQL queries, by issue list expressions , or (in some post functions or automation actions) by predefined selections, e.g. Issues under Epic. ToDo

UI Text Box
typetip
When dealing with issue lists, the notation for accessing values of each element is %{seed.issue.someField}, e.g. %{seed.issue.summary}

Workflow

functions and automation actions

functions 

You might face seed issues when trying to create /update/transition multiple issues .with the Create issue post function

Create issue action

by setting the "Mode" parameter: 

Number of issues to be createdModeDescription
Multiple issues JQLAn issue is created for every issue returned by the JQL query.Multiple issuesIssue based on an issue listAn issue is created for every issue returned by the issue list expression.


Example: You want to create multiple issue based on a a custom JQL that parser function that returns three issues, e.g. linkedIssues():

  • DEMO-1 Issue A
  • DEMO-2 Issue B
  • DEMO-3 Issue C

Creating issues based on this JQL queryresult, the post function will run three times, where the following values will be returned throughout those three runs

Run%{seed.issue.key}%{seed.issue.summary}
1DEMO-1Issue A
2DEMO-2Issue B
3DEMO-3Issue C

In general, using the seed notation, the nth run returns the field values of the nth issue from this list.

When choosing the Issue list mode, e.g. with an expression like linkedIssues(), the behavior is the same.

Further workflow functions and automation actions using seed issues

  • Transition issues post function
  • Update or copy field values post function
  • Condition on a list of issue keys or Validation on a list of issue keys
  • Condition on linked issues or Validation of linked issues
  • Condition on sub-tasks or Validation of sub-tasks

    Seed texts

    Text lists can either be

    • static, e.g. ["firstElement", "secondElement", "thirdElement"], or
    • composed dynamically by using the toStringList() expression parser functions, e.g. toStringList(%{issue.components}) or toStringList(%{issue.cf12345}}) (where the custom field with the ID 123456 is a multi option custom field) or
    • calculated by using one of the functions that return a text list like fieldHistory findPattern(), groupsUserBelongsTo() etc., e.g. fieldHistory%{findPattern(%{issue.summary}}) or groupsUserBelongsTo(%{system.currentUser}})versions}, "Release")}
    UI Text Box
    typetip
    When dealing with text lists, the notation for each element %{seed.text}.

    Workflow

    functions and automation actions

    functions 

    Create issue post function

    Number of issues to be createdModeDescription
    Multiple issues based on a text listText listAn issue is created for each element of a text list.


    Given the example of a static list above, the post function will run three times and the following values will be returned throughout those three runs

    Run%{seed.text}
    1firstElement
    2secondElement
    3thirdElement

    Given a dynamic example, having selected the components Frontend and Backend on an issue with %{toStringList(%{issue.components})}, the post function will run two times returning the following values for each run

    Run%{seed.text}
    1Frontend
    2Backend

    After adding a third component Interface, the post function will run three times returning the following values for each run

    Run%{seed.text}
    1Frontend
    2Backend
    3Interface

    According to this scenario, composing a summary with an expression like


    Code Block
    languagebash
    linenumberstrue
    "Summary of " + %of %{seed.text} + " Issue"


    will result in three issues, named

    • Summary of Frontend Issue
    • Summary of Backend Issue
    • Summary of Interface Issue
    Expression parser functions

    List functions like mathOnStringList() or textOnStringList()

    Examples

    Examples toDO

    Seed numbers

    Number lists Numbers can either be

    • static, e.g. [1, 2, 3], or
    • composed dynamically by using the toNumberListtoNumber() expression parser function or
    • calculated by using one of the functions that return a number list like releaseDates(), timesOfTransitionlike length(), etc., e.g.  releaseDates%{length(%{issue.fixVersionsversions}) or timesOfTransition("Done","Open"})
    UI Text Box
    typetip
    When dealing with number lists, the notation for each element is {seed.number}.

    Workflow functions

    and automation actions

    Number of issues to be createdModeDescription
    Multiple issues based on a numberNumeric modeThe number of issues provided by the numeric value is created.


    Given a static example with the numeric value of 3 in order to create three issues, the following values will be returned for each run

    Run{seed.number}
    11
    22
    33

    The number 3 is interpreted as a number list [1, 2, 3].


    According to this scenario, composing a summary with an expression like

    Code Block
    languagebash
    linenumberstrue
    "Summary of Issue # " + {seed.number}

    will result in three issues, named

    • Summary of Issue # 1
    • Summary of Issue # 2
    • Summary of Issue # 3

    Expression parser functions

    List functions like mathOnNumberList() or textOnNumberList()

    Excerpt Include
    DECADIS:Contact support
    DECADIS:Contact support
    nopaneltrue