Define field values for new linked issues
This is the documentation for JSU for Jira Cloud. If you are using JSU on Jira Server or on Jira Data Center, see the Server/Data Center documentation.
On this page: |
---|
Goal | Automate the creation of linked issues and their associated field values |
---|---|
Scenario | You are a Hiring Manager and you are onboarding a new Marketing Assistant. Your tasks to complete the onboarding could include:Â
Let’s see how JSU can create these linked tasks and associated issue fields when an origin Jira issue called Hiring a Marketing Assistant moves to in progress. |
JSU Components | Create a Linked Issue post function |
How to configure this rule
Create a draft of your project workflow. If you're unsure how to get to this page, follow the onboarding steps in Edit a Jira Workflow. You can then view your workflow in Text or Diagram mode. The steps in this use case represent Diagram mode. If you haven't already done so, switch the workflow viewer to Diagram mode.
We want to perform the automation on the in progress transition so that two subtasks are automatically created. Select the arrow that points to the In Progress status to show the transition rule Options menu.
Â
Select Post Functions from the list of options.
On the Post Functions tab, select Add post function.
Â
Select the Create A Linked Issue (JSU) post function and click Add at the bottom of the page.
Â
Now, let's configure your first post function:
We want to perform the automation inside the same project; for the Target Project, we select Inside same project.
We want our new issue to be related via Subtask; in The new issue will be related via option, we select Sub-Task.
Â
Now, let's configure the values of different issue fields. In this case, we want to copy a field value from the original issue (our task) to the new issue (a new subtask).
Select Add configuration at the bottom of the post function configuration page.From the list of operations, select Add for the Copy to New operation.
Â
In the Copy to New sub-function configuration, let's copy the task's Assignee to the Assignee of the subtask.Â
Â
Next, we want to copy the value from one field to another field within the origin issue. We once again select Add configuration.
We want to copy the Summary field of the origin issue to the Description field of the origin issue, while prepending it with a dash. Select Add for the Copy within Origin operation.
In our second configuration, let's copy the Summary to Description. Select prepend and manually type in a dash symbol
-
.
For text fields, you can define the separator for the prepend or append options, for example, :
, --
. This allows you to set a consistent pattern for all new issues of specific issue type, for example, a bug, or onboarding subtasks.
Â
We will configure the last operation by setting a value for the Summary of the new subtask. Once again, we select Add configuration.
We want to set the value for the summary of the new subtask; we select Add for the Set operation.
In our third configuration, we set
Create contract
to Summary. After completing your third configuration, click Add to add the post function to your workflow.ÂÂ
On the Post Functions tab, select Add post function.
Follow Steps 4 - 15 to create another subtask for ordering a PC. In this case, set the Summary of your new subtask toÂ
order PC
.We have now added all of our post functions.
Â
Publish your workflow, then let's see our setup in action.
Test the rule
Go to our project and create a task for hiring a Marketing Assistant.
Make the Summary,
Hiring Marketing Assistant
.Add
Onboarding process
in the Description.Add an Assignee.
Â
Change the task's status from Backlog to in Progress and watch the two subtasks appear through the automation we configured!
The description of your task is updated because of the Copy Within Origin functionality. Your new subtasks have been assigned to the assignee of the task due to the Copy to New functionality and their summary is set as configured by the Set functionality. That's it; JSU automated the work for you.Â
This was just one example of automating linked issues and field creation. Regardless of your needs, JSU's Create A Linked Issue post function and its operations can help you:
copy a field value from the origin issue to a new linked issue,
copy the value from one field to another field within the origin issue, and
set the value of a field in a new linked issue.
See also