You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

JWT is capable of processing values from multiple sources (e.g. issues, custom fields etc.). These sources are called seeds.

The following seeds are available:

  • Seed issues: All issues that are found or returned by an issue list
  • Seed strings: Strings, or texts, that are usually returned by a text list (e.g. custom field option list, list of components etc.)
  • Seed numbers: Fixed numbers or numbers returned by a calculation

If values from a seed source are needed to perform actions, the field codes need to be precedented with ^ or the word seed.

%{seed.issue.summary} # is the same as
^%{issue.summary}


JWT iterates over each seed and performs an action based on the values being found or specified. Whatever function or action you specify will be performed for each seed JWT recognizes.

Hier wäre doch ein Screencast wunderbar (smile) "Seeds in 60 seconds" - Oder erklärende Grafiken

Examples: to be linked and created

  • Create three subtasks and use each of the three current components as a summary - each component is a seed string
  • Create a task for each Epic returned by a JQL query - each epic is a seed issue
  • Add 4 comments - 4 is a seed number (since JWT will perform the action 4 times)



Probably most of the time, post functions executed with the help of JWT are related to 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 the simple field codes like %{issue.summary} - read more about Field codes in general.

However, since you can also use more complex functions in JWT that work with multiple issues, 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

You might face seed issues within the following functions:

  • Create (multiple) issues
  • Update (multiple) issues
  • Transition (multiple) issues
  • etc.

Seeds when creating issues

Given the Create issue post function or the Create issue action, the seed issues are all the issues to be created.

Seed issues

  • JQL - an issue is created for every issue returned by the JQL query.
  • Issue list -  an issue is created for every issue returned by the issue list expression.

When dealing with seed issues, the notation for each element is %{seed.issue.#fieldCode#}.

Given the result of your custom JQL will be three issues

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

Creating issues based on this JQL, 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.

This works exactly the same when choosing the Issue list mode, e.g. given the expression parser function linkedIssues() returns the same issues like shown before, the result 

Seed texts

  • Text list - an issue is created for each element of a text list.

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.%{issue.cf123456}}) (where the custom field with the ID 123456 is a multi option custom field).

When dealing with seed texts, the notation for each element %{seed.text}.

Given the example of the 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, 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

Seed numbers

  • Numeric - the number of issues provided by the numeric value is created.

Numbers can either be static, e.g. 3 for three issues, or calculated by using expression parser functions.

When dealing with numbers, the notation for each element is {seed.number}.

Given the static example of the numeric value being 3, the following values will be returned for each run

Run{seed.number}
11
22
33

That said, composing a summary with an expression like

"Summary of Issue #" + {seed.number}

would result in three issues, named

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