This function has been renamed with the JWT 3.0 release.
Find the new documentation at:
Purpose
Copy Parsed Text to a Field post-function is a general purpose tool for setting almost any kind of field (text, select, radio button, multi-select, checkboxes, cascading select, multi-cascading select, user, multi-user, dates, date-time, number, etc). Although, in the case of field types Number, Date, Date-Time and Priority (when using associated numeric value) it’s usually preferable to use post-function Mathematical and date-time expression calculator, since you can enter complex math and time expressions.
Example 1: Compose dynamic text by inserting field values
Text to be parsed in the example is: "Current issue has key" + %{00015} + ", was created by " + %{00005} + " on " + %{00009} + ", and its Summary in uppercase is \"" + %{00000} + "\"."
Note that:
%{00015}
is field code of "Issue key"%{00005}
is field code of "Reporter's full name"%{00009}
is field code of "Date and time of creation"%{00000}
is field code of "Summary"
Example 2: Create a comment with custom text after issue creation
Composing dynamic text by inserting field codes with format %{nnnnn} among text string literals. These field codes will be replaced at transition execution with the values of the corresponding fields. The resulting text will be copied into Target field.
Text to be parsed is: Current %{00014} issue was created on %{00009} by %{00005} in project %{00019} with summary %{00000}. It affects %{00077} versions, and is expected to be resolved on %{00012}.
Once configured, transition will look like this:
Example 3: Set or update the value of any type of custom field or virtual field
This is a very versatile feature that allows you to set the value of any custom field or issue feature in almost any way you may require.
Setting custom fields
Field type | Expected values and format when setting the field by a post-function | Examples |
---|---|---|
Checkboxes | Comma separated list of options to be selected. Admits + and - prefixes to add and remove single items. |
|
Radio Buttons | Name of the choice to be selected. | |
Select List (single choice) | Name of the choice to be selected. | |
Select List (multiple choices) | Comma separated list of options to be selected. Admits + and - prefixes to add and remove single items. |
|
Select List (multi-level cascading) | Multi-Level Cascading Select app supported: comma separated list of values for each level of the cascade. | America, USA, California, San Francisco |
Text Field (single line) | Text value (any other type will be cast to text) | |
Text Field (multi-line) | Text value (any other type will be cast to text) | |
Labels | space separated list of labels. Admits + and - prefixes to add and remove single items. |
|
Group Picker (single group) | Name of a group. | Administrators |
Group Picker (multiple groups) | Comma separated list of group names. Admits + and - prefixes to add and remove single items. |
|
User Picker (single user) | Name of a user name (not full name) or name of a project role. For project roles please make sure to set up a default user for a project role (Example 1) before. Supported apps: Issue Alternative Assignee | john |
User Picker (multiple users) | Comma separated list of user names (not full names), name of a group (every user in the group will be set), or name of a project role (every user in the project role will be set). Admits + and - prefixes to add and remove single items. |
|
Version Picker (single version) | Version name. | 1.0 |
Version Picker (multiple versions) | Comma separated list of version names. Admits + and - prefixes to add and remove single items. |
|
Project Picker (single project) | Project key or project name. |
|
Issue Picker | Issue Picker app supported: comma separated list of issue keys. Admits + and - prefixes to add and remove single items. |
|
Sprint | Jira Software's Sprint field can be set by writing on it the numerical ID of a Sprint. | Sprint's numeric ID can be obtained by moving the mouse pointer over some controls of JIRA UI as shown in this screenshot.
|
Customer Request Type | JSD's Customer Request Type field can be set by writing on it a Request Type's key. | Request type keys can be obtained by executing Copy a parsed text to a field post-function for writing the value of a field Customer Request Type with different values. A Request Type key begins by a project key followed by /. The default Request Type keys for a project with key ISD are:
Requires version 2.2.28 or higher. |
"Account" and "Team" TEMPO Timesheet's custom fields | Values used for setting these fields are internal numerical IDs. These IDs can be found out.
|
|
Note: All the examples above are shown in double quotes for readability, but if you are using basic parsing mode you should remove them.
Configuration Parameters
Parsing modes
This post-function provides 2 parsing modes:
- Basic: in this simple parsing mode you can write free text and insert field codes with format %{nnnnn} or %{nnnnn.i} anywhere in your text. These field codes will be replaced at execution time with the string field values of the corresponding fields.
- Advanced: This is the new parsing mode that was been introduced in version 2.1.18. It requires the text to be parsed to be written as a text-string expression respecting strictly the parsers grammar, otherwise you will get an parsing error. The new mode allows to insert math and time formulas, and text formatting function calls (trim, toUpperCase, toLowerCase, replaceAll, etc), making it much more powerful than the basic mode.
Automatic parsing mode converter: You can write your text in basic mode, and then switch to advanced mode. The text to be parsed will be automatically rewritten as a text-string expression. Now you can simply make the modifications you require, making use of text formatting functions, or inserting math or time expressions where needed.
Add or remove Single Items or Subsets of Items from Multi-valued fields (using prefixes +
or -
)
Syntax specification:
- + comma_separated_list_of_values : adds a set of values to the ones currently set in a multi-valued field.
- - comma_separated_list_of_values : removes a set of values from the ones currently set in a multi-valued field.
Don't write de double quotes.
Syntax examples: (don't write the double quotes) - + somevalue : adds a new value called somevalue.
- - valueA, valueB : removes values valueA and valueB.
- + valueA, valueC, - valueC, valueD : enables, checks or adds values valueA and valueB and disables, unchecks or removes values valueC and valueD.
Types of fields prefixes + and - work on: - Checkboxes
- Select List (multiple choices)
- Group Picker (multiple groups)
- User Picker (multiple users)
- Version Picker (multiple versions)
- Fixed versions
- Affected versions
- Labels
- Components
- Issue Picker
Examples: - Add and remove a single or a set of items from multi valued fields
- Combine the values of several Multi-User picker fields
- Add all assignees of certain sub-task types to a "Multi-User Picker" custom field
Set value of Selectable or Multi-Valued fields by Regular Expressions
Fields will be set with all valid options or items available for it that fulfills a certain regular expression (syntax: "/regexp/"), or not fulfilling it (syntax: "//regexp/"):
- Checkboxes
- Radio Buttons
- Select List (single choice)
- Select List (multiple choices)
- Group Picker (multiple groups)
- User Picker (multiple users)
- Version Picker (multiple versions)
- Fixed versions
- Affected versions
- Labels
- Components
Examples: - Set a Select or Multi-Select field using regular expression to express the values to be assigned
Change Issue Features: (more details at Virtual Fields)
- Summary
- Description
- Assignee
- Environment
- Reporter
- Priority
- Resolution
- Issue status: executes transitions in workflow to move issue to written status.
- Issue status (delayed writing): same as Issue status, only that waits for current transition to finish execution.
- Execute transition: expects the name of a transition, and executes it if all the conditions and validations are satisfied.
- Execute transition (delayed execution): same as Execute transition,only that waits for current transition to finish execution.
- Attachments (current attachments will be replaced): writing issue keys on this field will make attachments from those issues to replace current attachments.
- Attachments (only new attachments will be added): writing issue keys on this field will make attachments from those issues to be added to current issue.
- Last comment: it overwrites the last comment of the issue.
- Last comment's visibility restrictions: it set the visibility for the last comment of the issue. It expects the name of a group or of a project role.
- New comment: adds a new comment to the issue with no visibility restrictions. It expects the text of the comment.
- Labels: it overwrites the labels for the issue. Prefixes + and - can be used for adding or removing single labels.
- Components
- Affected versions
- Fixed versions
- Security level
- Watchers: it overwrites the current watchers of the issue. It expects a comma separated list of user names.
- New watchers: it expects a comma separated list of user names, and makes them watchers of the issue, maintaining current watchers.
Set Numeric and Date-Time fields: (more details at Virtual Fields)
- Due date
- Original estimate (minutes)
- Remaining estimate (minutes)
- Total time spent (minutes)
- Add to time spent (minutes): adds the number of minutes written into this field to the current work log of the issue.
- Date picker
- Date and Time picker
- Number custom fields
Fields introduced by plugin JIRA Misc Custom Fields are also supported.
Although it's possible to set numeric and date and time fields with post-function copy parsed text, it's much better to use post-function Mathematical and date-time expression calculator, which allows to do complex mathematical and time calculations.
Combining with other post-functions
You will often use Copy Parsed Text to a Field in combination with other post-functions, like Write field on linked issues or sub-tasks, Update issue fields and Set a field as a function of other fields.
You should select an Ephemeral field in parameter Target field, in order to hold a temporary parsed text that will be used by the next post-function. In the case of post-functions Write field on linked issues or sub-tasks and Update issue fields the resulting parsed text stored in an ephemeral field will be written into a field in other issues (linked issues, transitively linked issues, sub-tasks, sibling sub-tasks, or any issue returned by a JQL query).
Usage Examples
- 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