🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

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

Compare with Current View Page History

« Previous Version 2 Next »

Features used to implement the example



Example: Compose dynamic text by inserting field values in a text template

You can compose dynamic texts by inserting field codes among fixed parts of text. These field codes will be replaced with field values at transition execution time. Use post-function Copy parsed text to a field to set a field (custom or virtual) with a text template where inserted field codes (using format %{xxxxx}) will be replaced with field values at transition execution time. You will often use Copy parsed text to a field in combination with post-functions Write field on linked issues or sub-tasksUpdate issue fields and Set a field as a function of other fields.

In those cases you select an ephemeral field ("Ephemeral string 1", "Ephemeral string 2", ... "Ephemeral string 5") as Target field in post-function Copy parsed text to a field, in order to hold temporarily the result text once parsed. Then you can use post-functions Write field on linked issues or sub-tasks or Update issue fields to write it into other issues' fields (e.g., linked issues, transitively linked issues, sub-tasks, sibling sub-tasks, or any issue returned by a JQL query). Also post-function Set a field as a function of other fields can be used in order to conditionally write the parsed text according to simple or complex setting rules that depend on the value of other fields' values.

When Copy parsed text to a field post-function is executed, field codes (using format %{xxxxx}) inserted in the text template are replaced with current fields' values. We want a dynamically compose a text that will be added as a comment at the moment of issue closing.

Using post-function Copy parsed text to a field we store into auxiliary field "Ephemeral number 1" the result of having parsed the text template we use to compose the comment.


Text to be parsed used in this example is:

"The issue has been closed on " + %{00057} + " by " + %{00021} + ", and has remained " + (({00057} - {00009}) / {DAY}) + " days open." 

Note that:

  • %{00057} is code for string value of "Current date and time"
  • {00057} is code for numeric value of "Current date and time"
  • %{00021} is field code of "Current user's full name"
  • {00009} is code for numeric value of "Date and time of creation"

Using post-function Add a comment we insert a comment with text stored in field "Ephemeral string 1", setting desired visibility for the comment, and the user who will be appear as comment's author.



Once configured the transition looks like this:



More about this example

  • Since version 2.1.19 you have available a virtual field called New comment. You can use it to insert a new comment using post-function Copy parsed text to a field simply by selecting it as target field.
  • Since version 2.2.1 post-function Add a comment contains a text box where the text can be directly composed (using basic parsing mode). Since this version of the plugin, the 2 steps approach explained in this example only makes sense when you need to compose a text using advanced parsing mode.


Other examples of that functions

Add a comment


Copy parsed text to a field

Related Usage Examples