Renamed: Former "Write field on issues returned by JQL query or issue list"
This post-function is used for setting fields in issues selected by predefined options, a JQL Query or an Issue List expression, using any of the target fields.
Files attached to current issue in current transition's screen will be added to issues in status "In Progress" and assigned to the same user that has current issue assigned:
JQL query used is: assignee = "%{00003}" AND status = "In Progress"
Note that:
Once configured, your post-function will look like this:
Due date of issues linked to current issue with "blocks" issue link type, will be added 3 days, skipping weekend's days. In case the Due date is not set in blocked issues, it will be set using current issue's due date as value.
Described action will be carried out only into blocked issues in statuses "Open" or "In Progress".
Note that:
^{00012} != null ? addDaysSkippingWeekends(^{00012}, 3, LOCAL) : {00012}
, where {00012}
represent's due date in current issue, and ^{00012} due date in blocked issues. We use conditional operator ? :
in order to check whether due date is set in blocked issues, and then select the correct source value according to it.filterByStatus(linkedIssues("blocks"), "Open, In Progress")
. With this issue list expression we are selecting issues blocked by current issue, which are also in statuses "Open" or "In Progress".
Once configured, your post-function will look like this:
This post-function is intended to be executed in Epic's workflow, i.e., current issue is an Epic.
Note that:
min({00017}, ^{00017})
, where {00017}
represent's priority of current issue (i.e., Epic), and ^{00017} priority of tasks and subtasks. Note that the lower the value, the highest the priority. Highest priority is 0.filterByResolution(subtasks() UNION linkedIssues("is Epic of"), "")
. Here we use function filterByResolution() to select only those issues with empty resolution.
Once configured, your post-function will look like this:
There are several modes for selecting the issues whose field values are going to be set.
New since Version 2.4.0: Current Issue, Parent Issue, Linked Epic, Linked Issues, Subtasks, Sibling Subtasks, Issues under Epic and Sibling issues under Epic.
These new options simplify the usage of this post function a lot. For this cases no JQL Query or Issue List has to be configured.
In this issue selection mode we use JQL, which is a language provided by Jira for doing advanced issue searching.
You can insert field codes with format %{nnnnn} in your JQL query. These field codes will be replaced with the values of the corresponding fields in current issue at execution time, and the resulting JQL query will be processed by Jira JQL Parser. This way you can write dynamic JQL queries that depend on values of fields of current issue. Example: issuetype = "%{00014}" AND project = "%{00018}"
will return issues in same project and with same issue type as current issue.
When you write your JQL for selecting the issues, take into account the following advices:
summary ~ "%{00021}"
will return issues with current user's full name. As full name can contain spaces, we have written the field code between double quotes.issuekey in ("%{00061}")
will be rendered in runtime like issuekey in ("CRM-1, HR-2, HR-3"), which is syntactically incorrect. On the other hand, JQL Query issuekey in (%{00061})
will be rendered in runtime like issuekey in (CRM-1, HR-2, HR-3), which is correct.When we enter our JQL query, a syntax pre-checking is carried out in order to verify that it's correctly written. But when we insert field codes in our JQL query, the definitive form of the query that will be executed is unknown, since it depends on the actual values of the fields in runtime. In these cases the syntax pre-checking is done with speculative values given to the fields, and it might happen that fake syntax errors are reported. In order to inhibit the JQL syntax pre-checking you should enter //
at the beginning of the line. Those characters will be removed in the actual JQL query that will be executed.
Example:
In this issue selection mode we use an issue list expression according to the syntax of the Expression Parser. Here you can find Examples of Issue List expressions.