Features used to implement the examples
Multi Valued fields are fields that allow you to select more than one item:
- Checkboxes
- Select List (multiple choices)
- User Picker (multiple users)
- Group Picker (multiple groups)
- Version Picker (multiple versions)
- Fixed versions
- Affected versions
- Labels
- Components
- Request Participants
- Issue Picker
- Insight - Asset Management for Jira's Multi Select
You can use operators +
and -
to add or remove lone or set of items from Multi Valued fields.
Adding/Removing values from Current issue or Parent issue
- We use post-function Copy parsed text to a field to compose the text with operators
+
and-
, and copy it into a multi-valued field of current issue or parent issue (in the case of sub-tasks).
Adding/Removing values from other issues
- To add or remove a single item or a set items from a multi-valued fields in other issues (linked issues, sub-tasks, or issues returned by a JQL query) different from current issue, we use any of the following post-functions:
Adding and removing values in a single post-function
A string like + item_1, item_2, item_3, - item_4, item_5
will add items 1, 2, 3 and remove items 4, 5. You can also inject field codes in the string, and they will be replaced by its corresponding values when parsed by post-function at run time.
Example 1: Remove "Affects Version/s" from "Fix Version/s" in current issue
Since we are setting a field in current issue, we can do it in a single step using post-function Copy parsed text to a field with the following configuration:
Text to be parsed is: - %{00077}
Note that:
- %{00077} is field code for "Affects Version/s"
Once configured, the transition looks like this:
Example 2: Add components in sub-tasks to components in parent issue
We will explain 2 different configurations to implement this same behavior.
Use post-function Read fields from linked issues or sub-tasks to read Components from sub-tasks and write it into Ephemeral string 1 virtual field:
Use post-function Copy parsed text to a field to compose string with operator +
and Components of sub-tasks read in previous step and write it into main issue's field Components:
Text to be parsed is: + %{00061}
Note that:
- %{00061} is field code for "Ephemeral string 1"
Once configured, the transition looks like this:
Alternative implementation
Using one single post-function, use post-function Copy parsed text to a field with the following configuration:
Text to be parsed: "+ " + toString(fieldValue(%{00094}, subtasks()))
Once configured, the transition looks like this:
Example 3: Remove reporters of blocking and cloned issues from a "Multi User" field called "Team"
We will explain 2 different configurations to implement this same behavior:
Use post-function Read fields from linked issues or sub-tasks to read field Reporter from linked issues and write it into Ephemeral string 1:
Use post-function Copy parsed text to a field to compose string with operator -
and Reporter previously read in step 1 and write it into Multi User field Team:
Text to be parsed is: - %{00061}
Note that:
- %{00061} is field code for "Ephemeral string 1"
Once configured, the transition looks like this:
Alternative implementation
Using one single post-function,use post-function Copy parsed text to a field with the following configuration:
Text to be parsed: "- " + toString(fieldValue(%{00006}, linkedIssues("is blocked by, is cloned by")))
Once configured, the transition looks like this:
Other examples of that functions
Read fields from linked issues or sub-tasks
- Add all assignees of certain sub-task types to a "Multi-User Picker" custom field
- Add and remove a single or a set of items from multi valued fields
- Copy "Due date" into a date type custom field in a linked issue if it's greater than current issue's "Due date"
- Copy attachments from one issue to another
- Make an issue inherit highest priority among those of linked issues
- Propagate highest priority from blocked issues to blocking issues
- Sum sub-task's "Time Spent" (work logs) and add it to a certain linked issue
- Add all assignees of certain sub-task types to a "Multi-User Picker" custom field
- Add and remove a single or a set of items from multi valued fields
- Add current user to comment
- Add or remove request participants
- Add watchers from a part of the issue summary: "Summary_text - watcher1, watcher2, watcher3, ..."
- Assign issue based on the value of a Cascading Select custom field
- Assign issue to last user who executed a certain transition in the workflow
- Automatically close resolved sub-tasks when parent issue is closed
- Automatically reopen parent issue when one of its sub-tasks is reopened
- Calculate the time elapsed between 2 transition executions
- Close parent issue when all sub-tasks are closed
- Combine the values of several Multi-User picker fields
- Compose a parsed text including the "full name" or a user selected in a User Picker custom field
- Compose dynamic text by inserting field values in a text template
- Copy issue labels to a custom field
- Copy the value of a user property into a user picker
- Create a comment in sub-tasks when parent transitions
- Execute transition in epic
- Getting the number of selected values in a custom field of type Multi Select
- Limit the number of hours a user can log per day
- Make a sub-task's status match parent issue's current status on creation
- Make parent issue progress through its workflow
- Moving story to "In Progress" when one of its sub-tasks is moved to "In Progress"
- Moving story to "Ready for QA" once all its sub-tasks are in "Ready for QA" status
- Parse Email adresses to watchers list
- Parsing text from last comment and appending it to issue's summary
- Remove versions selected in a version picker custom field
- Replace certain issue link types with different ones
- Restrict parent issue from closing if it has sub-tasks that were created during a given parent issue status
- Set a Select or Multi-Select field using regular expression to express the values to be assigned
- Set assignee depending on issue type
- Set field depending on time passed since issue creation
- Set priority for issues that have been in a certain status for longer than 24 hours
- Set security level based on groups and project roles the reporter or creator are in
- Transition linked issues in currently active sprint
- Transition only a sub-task among several ones
- Transition parent issue only when certain issue sub-task types are done
- Update Cascading Select custom field with a value of the field in parent issue
- Update checkboxes custom field if a file has been attached during a transition
- Validation on issue attachments
- Validation on MIME types of issue attachments
- Writing a comment to blocked issues when blocking issues are resolved