Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Note: this page includes legacy Use Cases for JMWE for Jira Data Center/Server. These use cases are in the process of being verified and updated; you can still use them, but you may encounter discrepancies between what is documented and what you see in JMWE.
This section has use cases which help you in understand the usage of Post-functions provided by JMWE.
Assign to role member
This post function can be used to assign an issue to the member of a selected project role
Sample use cases:
On the creation of a Bug assign it to a user only if he is a Product Owner
Add the Assign to role member to the Create transition.
Select Product Owner as the Project Role
Select Use selected assignee, only if a member of the required role option
Assign an issue to a member of the QA team when the issue is transitioned to Ready for testing status
Create a QA project role, with the testers as its members.
Add the Assign to role member post-function to the transition that leads to Ready for testing status.
This post function can be used assign an issue to the last role member of a selected project role. This is very much similar to the Assign to role member, except that it always looks for the last role member.
Sample use cases:
When a tester reopens an issue assign the issue to a Developer who last worked on it.
Create a Developer project role, with the developers as its members.
Add the Assign to last role member to the Reopen transition.
Select Developer as the Project Role
After testers have validated an issue, it should be assigned to the last product owner who worked on it for the functional validation. The product owner might either have been explicitly assigned to the issue before, to write the functional specification or have written the specification while creating the issue.
Create a Product Owner project role, with the product owners as its members.
Add the Assign to last role member post-function to the Validate transition of the workflow.
Select Product Owner as the project role to look for.
Select Include Reporter option in case a product owner created the issue but was never assigned to it afterward.
Clear the Fix Version/s field on the reopening of a ticket.
Add the Clear field value post-function to the Reopen transition of the workflow.
Select the field Fix Version/s to from Field.
Clear field of related issues
This post-function clears the value of the selected field(s) of the issue's related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.)
Clear a set of fields on all the linked issues of the current issue when an Abort is triggered on the current issue
Add the Clear field value of related issue post-function to the Abort transition of the workflow.
Select Issues linked to the current issue through any link type from Which Issue(s)
Select all the fields to be emptied from Field.
Comment issue
This post-function can be used to comment an issue either by using a Raw value or the result of a Groovy expression or aGroovy template.
Sample use cases:
A customer using Jira Service Desk should be notified via a comment when someone has started working on their support request.
Add the Comment issue post-function to the Start Progress transition.
Select the Comment type as Groovy template
Write the following content in the Comment section:
We have started working on your support request - $issue.key. We will get back to you within 24 hours.
On resolving or closing the issue, comment the issue with a summary of the worklog.
Add the Comment issue post-function to the Start Progress transition.
Select the Comment type as Groovy template
Write the following content in the Comment section:
This post-function creates a comment on all issue's related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.). The text of the comment can be either a text, optionally including a Groovy template markup, or the result of the evaluation of a Groovy expression.
Sample use cases:
An issue is blocking another and you want to ensure the Assignee of the blocked issue is notified when the impediment has been resolved.
Add the Comment related issues post-function to the transition that resolves the current issue.
Select Issues linked to the current issue through the following link type under Which Issue(s)
Choose the issue link type blocks
Select the Comment type as Groovy template
Write the following content in the Comment section.
The impediment $issue.key- $issue.summary has been resolved.
Add a comment on all the sub-tasks when the parent is cancelled
Add the Comment related issues post-function to the Cancel transition
Select the Comment type as Groovy template
Select Sub-tasks of the current issue under Which issue(s)
Write the following content in the Comment section.
The parent of the issue i.e $issue.key has been canceled.
On the Approval of an issue, copy the comment added if any to its sub-tasks.
Add the Comment related issues post-function to the Approve transition
Select the Comment type as Groovy template
Select Sub-tasks of the current issue under Which issue(s)
Write the following content in the Comment section.
This post-function can be used to create a new issue.
Sample use cases:
On the approval of a Story, create two sub-tasks: one for Development and another for QA.
Add the Create/Clone issue post-function to the transition Approve of the Story workflow to create a QA ticket.
Select Same as current issue from the Project field.
Select Subtask from the Issue type field.
Select Current issue from the Parent issue field.
Add a Summary
Task for <%=it%>
Select the option under "Multiple issue creation"
Input the following value:
["Development","QA"]
Two sub-tasks will be created, one for "Development" and another for "Subtask"
Create a bug in Project B when the developer confirms a Bug in Project A for the component UI
Add the Create/Clone issue post-function to the Start Progress transition of the Bug workflow.
Select the Production project from the Project field.
Select Bug from the Issue type field.
Set Summary field to $issue.summary
Set Linked Issues field to be copied from the current issue
Select is cloned by in the Link to new issue section.
Select the Conditional execution section and write the following script:
issue.get("components").any{it.name == "UI"}
To onboard a new employee in the HR database, create tasks one for each value selected in "Onboarding Tasks" multi-valued field
Add the Create issue post-function to the transition Create of the New Employee ticket workflow.
Select Same as current issue from the Project field.
Select Task from the Issue type field.
Select the link type from the main issue to the new issues under "Link type"
Edit the Summary field value to:
Task for <%=it.value%>
Select the option under "Multiple issue creation"
Input the following value:
issue.get("Onboarding Tasks")
An Epic has a Story and the Story has a sub-task. When the sub-task is reopened we want to create a bug in another project linking it to the sub-task. On creation of the Bug, set its Epic link to the Story's Epic link
Add the Create issue post-function to the Reopen transition of the sub-task workflow.
Select the project from Project
Select the Bug in Issue type
Select is caused by in Link to new issue
Select the Epic Link field in Set fields of new issue.
This post-function sets the value of a field to the value of a field in related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.)
Sample use cases:
Copy the Fix Version/s field from the Epic to a Story, while creating a Story.
Add the Copy field value from related issues post-function to the Create transition of the Story workflow.
Select Fix Version/s in Source Field.
Select Same as the source field in Destination Field.
Choose Issues that belong to the current Epic from Which Issue(s)
This post-function copies the value of a field to all related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.)
Sample uses cases:
Copy the Fix Version/s field from the Stories to Epic, after resolving a user story.
Add the Copy field value to related issues post-function to the Resolve transition of the Story workflow
Select Fix Version/s in Source Field.
Select Same as the source field in Destination Field.
Choose Epic of the current issue from Which issue(s).
Check Add source value(s) to destination field option.
This post-function can be used to copy the value(s) of one field to another field of the same issue.
Sample use cases:
Set the component of an issue with a value selected from a cascading field that carries the Main and Sub-components in parent and child.
Add the Copy value from field to field post-function to the Create transition of the issue workflow.
Select the Cascading field as the Source field.
Select the Components field as the Destination field.
Select Return "parent - child" for cascading custom fields option.
Note: The Component name should be in Component - Subcomponent format.
Issues in our project are fixed in the version they are found. So I want to copy the Affects Version/s of the issue to the Fix Versions, on resolving the issue.
Add the Copy value from field to field post-function to the Resolve transition of the issue's workflow.
Select Affects Version/s as the Source field.
Select Fix Version/s as the Destination field.
I want 'Capture for JIRA Environment' field to be copied to the 'Environment' field when a bug is created using Capture for JIRA.
Add the Copy value from field to field post-function to the Create transition of the Bug workflow.
Select Capture for JIRA Environment as the Source field.
Select Environment as the Destination field.
Copy value from a Single Version Picker select list to the Fix Version(s) field if the resolution provided while closing the issue is "Fixed".
Add the Copy value from field to field post-functionto the Close transition of the issue's workflow.
Select the Single version picker in the Source field.
Select the Fix Version/s in the Destination field.
Select the Conditional execution and write the following script:
On the Approval of an issue copy its components to issues linked to it with duplicates link type, only if the linked issue belongs to the same project as the current issue.
Add the Set field value of related issues post-function to the Approval transition of the issue's workflow.
Select the Components field.
Select Issues linked to the current issue through the following link type under Which issues
Choose the issue link type as duplicates
Select the Value type as Groovy Expression
Write the following content in the Value section.
issue.getAsString("components")
Write the following in Conditional execution section
This post function is used to set a field value with value(s) specified in the post-function. The value set can either be a fixed text or the result of the evaluation of a Groovy expression or the result of a Groovy template.
Sample use cases:
Set a custom field with the total work log entered during the rework on an issue
Add the Set field value post-function to the Rework transition of the issue's workflow.