JWT workflow functions

The way tasks and processes are managed in Jira is through workflows. A workflow maps out the statuses an issue can go through and the available transitions between the statuses that together define your entire process. 

You can edit the overall workflow used in a project, or modify the way particular issue types are handled in the workflow. But: At some point, you might end up stuck in the middle of nowhere because of feature limitations.

At this point, Jira Workflow Toolbox for Jira comes in handy!

JWT for Jira enhances the way you configure workflows. It extends the native functionality by offering custom conditions, validators, and post functions.

JWTCLOUD Get Started.png

Expression parser

Expressions are a fundamental concept within Jira Workflow Toolbox: every input into the JWT expression editor is considered an expression and will be interpreted by the JWT expression parser against the selected Parsing modes .

If you are new to JWT, we suggest starting with the JWT expression editor.


Conditions

Conditions are used to control the transitions available to a user. If a condition fails, the user will not see the transition button on the Jira issue view, and so will not be able to execute the transition.

• Condition types


📚 Condition use cases library

Use case JWT feature Label Parser functions Use case description Workflow function
Specific sub-tasks must be resolved

(blue-star) (blue-star) 


Ensure that that all sub-tasks of a specific issue type are resolved.

Condition on sub-tasks

Validation of sub-tasks

Prevent users from selecting specific fix versions

(blue-star) (blue-star) 


Ensure that specific fix versions have not been selected.

Condition based on regular expression

Validation based on regular expression

All sub-tasks must be resolved

(blue-star) (blue-star) 

staff pick

Ensure that that all sub-tasks of the current issue are resolved.

Condition on sub-tasks

Validation of sub-tasks

Make the assignee required

(blue-star) (blue-star) 



Fields required

Fields required or changed

An issue must have at least 3 resolved Test Cases

(blue-star) (blue-star) 


Ensure that that all sub-tasks of a specific issue type are resolved.

Condition on sub-tasks

Validation of sub-tasks

Only watchers can execute a transition

(blue-star) 


Ensure that only users watching an issue can see a transition.

Only users in a field

A developer must not execute the transition

(blue-star) 



User is not in project role

Only users in a project role can execute a transition

(blue-star) (blue-star) 



Users are/aren't in project role (validator)

Users are/aren't in project role (condition)

All blocking issues must be resolved

(blue-star) (blue-star) 



Condition on linked issues

Validation of linked issues

There must be at least one related Service Management request

(blue-star) (blue-star) 



Condition on linked issues

Validation of linked issues

All sub-tasks with a resolution of Done must be in a specific status

(blue-star) (blue-star) 


Ensure that all sub-tasks, which have a resolution value of Done must be in the Closed status.

Condition on sub-tasks

Validation of sub-tasks

Assignee may only have a restricted number of assigned issues

(blue-star) (blue-star) 



Condition based on JQL query

Validation based on JQL query

Only user specified in project property is allowed to execute transition

(blue-star) (blue-star) 


projectProperty()

Condition on JWT project property

Validation of JWT project property

All sub-tasks must be Done or Closed

(blue-star) (blue-star) 


Ensure that that all sub-tasks of the current issue are Done or Closed.

Condition on sub-tasks

Validation of sub-tasks

Hide transition to a previous status

(blue-star) 


Hide a transition based on the condition of the previous status.

Logical condition

Hide transition from issue creator

(blue-star) 


Hide a transition from the issue creator.

Except users in field

Make the description required

(blue-star) (blue-star) 



Fields required

Fields required or changed

Current user must be reporter

(blue-star) (blue-star) 



Compare two values condition

Compare two values validator

Set a condition in a global transition which only applies in a certain status

(blue-star) 


Set a transition that only applies in a certain status.

Logical condition

Resolution must be empty

(blue-star) (blue-star) 



Fields required

Fields required or changed

All sub-tasks in the Closed status must have a specific resolution

(blue-star) (blue-star) 



Ensure that all sub-tasks, which are in the Closed status have a resolution of Done.

Condition on sub-tasks

Validation of sub-tasks

Validators

Validators are used to guarantee accuracy of existing issue data or data entered on a transition screen before a transition is performed.

• Validator types


📚 Validator use cases library

Use case JWT feature Label Parser function Parser functions Use case description Workflow function
Prevent a transition depending of the number of components

(blue-star) (blue-star) 


numberOfSelectedItems()

Logical validator

Logical condition

Prevent a closed issue from being reopened after resting 1 week closed

(blue-star) (blue-star) 


isInRole()

Prevent an issue from being reopened after being closed for a period of time unless the user has some specific roles.

Logical validator

Logical condition

Prevent issue from being "Closed" if blocking issues are not closed yet.

(blue-star) 



Prevent issues from being closed if there exist blocking issues (linked with "is blocked by") still not closed.

Validation of linked issues

Prevent the creation of sub-tasks unless the parent issue is in a certain status

(blue-star) 

Logical validator

Block an Epic's transition until all the issues under that Epic are resolved

(blue-star) 


count()

issuesUnderEpic()

filterByResolution()

Logical validator

Logical condition

Block an Epic's transition depending on linked issues status and due date

(blue-star) (blue-star) 


count()

filterByPredicate()

linkedIssues()

Allow a certain transition in Epic's workflow to be executed.

Logical validator

Logical condition

Prevent transitioning when there is a blocking issue

(blue-star) 



Block the transition of an issue from "In progress" to "Completed" until all linked issues that block this issue are resolved.

Validation of linked issues

Evaluate Assets objects

(blue-star) (blue-star) 


findPattern() findReplaceAll() replaceAll() toStringList()

Evaluate if an object is in a Assets object custom field.

Logical validator

Logical condition

Prevent issue creation with the same field value

(blue-star) 

Staff pick


Prevent issue creation when there is already another issue in the same project with the same value in a certain field.

Validation based on JQL query

Logical validator

Proceed with a task only when all sub-tasks are completed

(blue-star) (blue-star) 



Only proceed with a task only when all sub-tasks are completed.

Condition on sub-tasks

Validation of sub-tasks

Prevent setting due dates outside business hours

(blue-star) 

staff pick

withinCalendar()

Logical validator

Logical condition

Prevent creation of issues with a duplicate summary

(blue-star) 


Ensure that users cannot create new issues if an issue of the same type and summary already exists in the project.

Validation based on JQL query

Ensure that all issues linked with a certain issue link type have "Due Date" field set

(blue-star) (blue-star) 


count()

linkedIssues()

fieldValue()

Check that the issue linked to the current issue with link type name "linkA" has a due date field set.

Logical validator

Logical condition

Validation based on the value of a date type project property

(blue-star) 


stringToDate()

projectProperty()

Show project property value in the validation message

Logical validator

Logical condition

Prevent issue creation if description contains less than 100 characters

(blue-star) 

replaceAll() length()

Logical validator

Restrict issue creation per issue type and project role

(blue-star) 


isInRole()

Logical validator

Validate a Select List (cascading) custom field

(blue-star) 



Validate the parent and child options of a Select List (cascading) field.

Logical validator Logical condition

Ensure that an issue has at least one attachment

(blue-star) 

Staff pick

matches()

Validate that an issue has specific files attached.

Logical validator

Logical condition

Prevent issue creation with the same field value (Boolean)

(blue-star) 


count()

issuesFromJQL()

Prevent issue creation when there is already another issue in the same project with the same value in a certain field.

Logical validator

Validation based on JQL query

Validate only issue links created in transition screen

(blue-star) 


count()

transitionLinkedIssues()

filterByProject()

filterByIssueType()

Check only the issue links added to the transition screen.

Logical validator

Reject duplicated file names in attachments

(blue-star) (blue-star) 


count()

toStringList()

distinct()

Reject attachments with repeated file names.

Logical validator

Logical condition

Prevent external users from creating issues

(blue-star) 

matches() toString() textOnStringList() toStringList() userDisplayName()

Logical validator

Halt a transition if an element is not contained in a list

(blue-star) (blue-star) 

toStringList()

Logical validator Logical condition

Block a transition until all sub-tasks have certain fields populated

(blue-star) (blue-star) 

staff pick

count()

filterByPredicate()

subtasks()

Allow a transition only if all sub-tasks have specific fields populated

Logical validator

Logical condition

Restrict the issue creation with specific issue types to certain project roles

(blue-star) 



Users are/aren't in project role (validator)

Close parent issue only when all sub-tasks are closed

(blue-star) (blue-star) 



Automatically close parent issue when all sub-tasks has been closed.

Condition on sub-tasks

Validation of sub-tasks

Make "Time spent" field required

(blue-star) 



Logical validator

Post functions

Post functions are used to perform additional processing and help to automate tasks after a transition is performed.

• Post function types

To get more familiar with post functions, we recommend to take a look at our use case library:

📚 Post function use cases library

Use case JWT feature Label Parser functions Use case description Workflow function
Add comment with the request participants' display name

(cog) 


toString()  textOnStringList() toStringList() userDisplayName()

Add comment

Create issue under epic

(cog) 

toString() epic()

Create issue

Get attributes of Assets objects

(cog) 


Execute remote action

Log absence time on another issue

(cog) 


stringToDate()

Log work

Prioritize the issues globally

(cog) 

indexOf() previousValue() issuesFromJQL()

Update or copy field values

Automatically fill an insight custom field after a transition

(cog) 


Update or copy field values

Move an issue to another issue type

(cog) 


Move issue

Create an internal Service Management comment on linked issues

(cog) 


Add an internal service project comment to linked issues

Update or copy field values

Alert the reporter

(cog) 



Add comment

Create issues randomly

(cog) 


modulus()

round()

random()

Create issue

Create a sub-task for every sub-task closed

(cog) 

findReplaceFirst() first() findPattern() toString() sum() toNumber()

Create issue

Obtain a value from an Elements Connect custom field

(cog) 

findPattern()

toString()

Send email

Clone epic, tasks and sub-tasks

(cog) 

toString() toStringList() issueKeysToIssueList() replaceFirst() first() fieldValue() textOnStringList() findModify() subtasks() issuesUnderEpic()

Create issue

Set a date on the same week day on alternate weeks

(cog) 

addDays() nextDayOfTheWeek() modulus() weekOfTheYear() datePart()

Update or copy field values

Set a Date Picker field to the nth day of the month

(cog) 

dayOfTheMonth() lastDayOfTheMonth() addDays()

Update or copy field values

Alert the assignee of important issues

(cog) 



Add comme nt

Set the next fix version

(cog) 

floor() toNumber() substring() length()

Update or copy field values

Create Confluence page with links to issues

(cog) 


Execute remote action

Set reporter as assignee if a User Picker field is empty

(cog) 

Update field based on rules

Set fix version based on its start and release date

(cog) 


toString() textOnStringList() unreleasedVersions() startDates() releaseDates() first()

Update or copy field values 

Add user to field depending on selected options

(cog) 

Update field based on rules

Set Due Date with latest value among sub-tasks

(cog) 


fieldValue()

max()

siblingSubtasks()

Update or copy field values

Create sub-tasks depending on selected values in custom field

(cog) 

staff pick

toStringList()

Create issue

Assign important issues to the project lead

(cog) 


Update or copy field values

Automatically log work on a Jira issue

(cog) 


dateTimeToString()

Execute remote action

Add percentaged profit margin when closing issue

(cog) 


Log work

Reopen parent issue, if a sub-task is reopened

(cog) 


Automatically reopen the parent issue, if one of the sub-tasks is reopened.

Transition issue

Extract an email address from the last comment

(cog) 


Copy excerpted value

Shorten the summary to a maximum number of characters

(cog) 

substring() length()

Update or copy field values

Create an overview page for a software release

(cog) 


Execute remote action

Create an issue with a custom summary

(cog) 

previousValue()

Create issue

Set issue security level depending on reporter

(cog) 

Staff pick

issueSecurityLevel()

Update field based on rules

Keep the status of parents and sub-tasks in sync (post function use case)

(cog) 



Transition issue

Clone issue in external instance

(cog) 


Execute remote action

Match several values of a list

(cog) 

toString() distinct() filterByPredicate()

Update or copy field values

Create a sub-task for each component

(cog) 


toStringList()

Create issue

Format the issue's summary according to specified rules

(cog) 

staff pick

Format field value

Create three issues with individual summaries

(cog) 


getMatchingValue()

Create issue

Create a component to group issues related to UI design

(cog) 


Execute remote action

Link issue to issue keys in its description

(cog) 

findPattern() toString()

Create issue link

Assign issue to current user

(cog) 


Assign an issue to the current user automatically.

Update or copy field values

Keep parent issue's priority in sync

(cog) 


Update or copy field values

Notify the reporter of an issue about its status by a Telegram message

(cog) 


Execute remote action

Set the assignee of an external issue same as the transitioned issue

(cog) 



Execute remote action

Add assignee as watcher to every blocking issue

(cog) 



Update linked issue or sub-task

Add internal Jira Service Management comment

(cog) 



Add comment

Start Progress on parent, if sub-tasks are started

(cog) 

staff pick


Transition issue

Create several issues combining fields

(cog) 

nthElement() toStringList() modulus() count() ceil()

Create issue

Transition an external Jira ticket based on the linked internal one

(cog) 



Execute remote action

Create a comment on an external Jira ticket

(cog) 


Execute remote action

Set assignee based on a former assignee

(cog) 

previousValue()

Update or copy field values

Automatically log work spent in a specific status

⛭ 


timeDifference()

Log work

Set assignee based on priority

(cog) 


priority()

Update field based on rules

Automatically link an issue to an external one

(cog) 


Execute remote action

Create a personal space for a new employee

(cog) 


Execute remote action

Triage issues created by email

(cog) 

STAFF PICK

toUpperCase() 

toString() 

findPattern() 

isInGroup()

Move issue

Get Hubspot contact information

(cog) 

Execute remote action

Link a Jira issue with the corresponding release ticket

(cog) 


Execute remote action

Get Checklist

(cog) 


Execute remote action

Add watchers ignoring inactive users

(cog) 

usersInGroup() isActive() toString() filterByPredicate()

Update or copy field values

Add watchers based on issue type

(cog) 



Add or remove watchers

Add a table with the elements of a text to an email

(cog) 

toString() textOnStringList() toStringList()

Send email

Copy latest due date from sub-tasks

(cog) 


Copy field values from linked issues or subtasks

Copy formatted description of issue into email

(cog) 

wikiToHTML()

Send email

Automatically assign a tester during your development process

(cog) 


Assign to project role

Create a new employee account during an onboarding process

(cog) 


Execute remote action

Remove blocking links when blocking issue is closed

(cog) 


Delete issue link

Create several sub-tasks depending on the component

(cog) 

Create issue

Read the information from a Trello card

(cog) 


Execute remote action

Extract the issue priority from the summary

(cog) 


Copy excerpted value

Add days skipping weekends and holidays to a Date Picker field

(cog) 

addTime()

Update or copy field values

Fast-track transition issues assigned to the project lead

(cog) 

staff pick


Transition issue

Set Checklist

(cog) 


Execute remote action

Create an external project for a new employee during an onboarding process

(cog) 


Execute remote action

Automatically create a version when starting the release

(cog) 


Execute remote action

Create an issue in the current project

⛭ 

staff pick

Create issue

Create a sub-task for every user in a field and assign them

(cog) 

getMatchingValue()

toStringList()

Create issue

Translate the description

(cog) 

replaceAll() wikiToHTML() htmlToTxt()

Execute remote action

Move an issue to another project

(cog) 


Move issue

Copy highest priority from linked issues

(cog) 


Copy field values from linked issues or subtasks

Keep track of important status updates

(cog) 


dateTimeToString()

Update or copy field values

Fields required or changed

Create a sub-task for every recurring deadline within a task

(cog) 

addMonths() getMatchingValue() dateToString()

Create issue

Change the assignee to the next evaluator

(cog) 

first()

toStringList()

Update or copy field values

Retrieve the assets of an issue in Jira cloud

(cog) 


Execute remote action

Set a watcher based on custom field value

(cog) 



Add or remove watchers

Add comment when creating issues outside of business hours

(cog) 

Staff Pick

withinCalendar()

Add comment

Set assignee depending on issue type

(cog) 


issueType()

Update field based on rules

Inline images in a generated email

(cog) 


replaceAll()

Send email

Set specific default assignee if not set

(cog) 


Copy JWT project property

Create child issue within Advanced Roadmaps hierarchy

(cog) 

Create issue

Keep the status of an issue and its linked issues in sync

(cog) 

Transition issue

Add or remove request participants

(cog) 

Update or copy field values

Add attachments from current issue to cloning issues

(cog) 



Update linked issue or sub-task

Send email after transitioning to specific status

(cog) 



Send email

Send email with the URL of the attachments included in the description

(cog) 

replaceAll() toString() attachmentUrls() findPattern()

Send email

Add a hyperlink to an issue in an email

(cog) 

Send email