Create a Linked Issue post function is available from JSU version 2.0
This post function will create a new issue. The new issue will be linked to the origin issue (the one, which triggered the 'Create a Linked Issue' post function).
Any number of fields can be copied to the new issue and within the origin issue.
See the Testing and Fixing Bugs use case for an example of how several of our customers are using this post function. The video on that page shows you the following sample configuration in action.
Create Linked Issue is a very powerful post function. It has several sections for its configuration described below.
The configuration then has several sections, as described in the following sections:
Function Execution Control
Here the idea is, that you have a checkbox custom field on the transition screen, so the user can control some of the functionality.
For example a checkbox 'Create Bug?' might be configured as 'Custom Field that enables linked issue creation'. Only if it is ticked, a new issue will be created. Typically this checkbox custom fields won't appear in the normal screen of the issue. Also at the end you might set them back to the original (default) value (see Copy within the Origin Issue).
Instead of letting the user choose to copy/move the attachments, you can also configure to never/always copy them.
Tip: You might choose 'Move Attachments added during Transition'. The user then adds some attachments on the transition screen of the origin issue. However, since they are moved to the newly created issue, it feels as if he added the attachments to the new issue.
If you use 'Move Attachments added during Transition' it is important that the 'Create Linked Issue' Post-Function is before JIRA Post-Function 'Update change history for an issue and store the issue in the database'!
Due to a Bug in Jira JRASERVER-65939, 'Copy or Move Attachments' functionality, which is added through a Transition Screen, does not work in Jira 7.5.x & 7.6.0. If you require this functionality, please upgrade to minimum Jira Version 7.6.1!
Additionally, the summary will always be copied from the origin issue to the new issue. The reporter of the new issue will always be set to the user who triggered the current transition (and thus this post function). However you might overwrite them again later with Copy from the Origin Issue to the New Issue
Target Project can be set to:
Inside same project
A new issue will be created in this same project
If you use the workflow with the 'Create a Linked Issue' post function in several JIRA projects, you might choose 'Project variables'. You then can configure in each of those Jira project a different target project for the newly created issues. For more about project variables see Project Variables.
The format for those project variables is as follows:
Workflow Name and Workflow Transition Number are optional.
From project A, you might create new linked issues in project X. But from project B, you might create new linked issues in project Y. But both use the same workflow.
Project Variable in project A: createLinkedIssueTargetProjectKey=X Project Variable in project B: createLinkedIssueTargetProjectKey=Y
The new issue will be created with the same user, who triggered the transition on the origin issue. If that user does not have the necessary permissions in the target project he will get an error. Also if some validators prevent the creation of the new issue.
A new issue will be created in the selected project
Defined by custom field selection
A new issue will be created in a project which is defined in the selected custom field. Here available are fields of types: single select, radio buttons, project pickers
An administrator can create a field "Destination Project" with several different values which will represent project key (only capital letters) or project name (capital and small letters are supported)
Create new Issue as User
If you don't specify anything here, the create operation will be performed under the same user, who triggered this post function on the origin issue. Thus that user must have the necessary permissions to create the new issue.
However, in some restrictive setups the user might not be allowed to create new issues in the target project. He might not even see the target project!
With 'Create new Issue as User' you can specify a different user account that owns the necessary permissions. Usually, this user account is assumed to be only technical, with broad permissions, but not used to log into Jira by an actual person.
This Issue will be related via
Since JSU 2.1.0 the Create a Linked Issue post function allows you the create new issues, which are connected not only with an issue link, but instead also in a parent / sub-task, as well as epic / issue in epic relation.
See Related Issues for more explanation on this topic (especially for creating sub-tasks).
Issue type can be set to:
Selected issue type
A new issue type will have a particular issue type.
Be aware, that the issue type you configure here must be available in the target project.
Be aware, that the issue type you provide in this custom field must be available in the target project.
The user will be able to select which issue type should be created. As a Jira administrator, you also have to create this custom field (in the sample screenshots: Destination Issue Type). Carefully note the values of this custom field. These values have to match the issue types available in the target project.
In JSU you can define configurations in order to modify fields on the origin and new issue, only available for Create Linked Issue Post function.
Definition of Terms for the Configure Fields Objects
This chapter provides you with definitions of the basic terms in Configure Fields.
Origin issue: Issue that triggered the post function
New issue: Issue to be created by the post function which was triggered on the origin issue
Choose your Field Configuration
Click the "Add Configuration" button and insert the operation you want to execute.
You can configure any number of configurations. They are executed sequentially.
You can rearrange the configurations by dragging in the line using the handle on the left.
You can also disable a configuration by unchecking the enabled flag next to the delete button. Your operation will remain on your configuration but will be ignored.
Let's say you are a Hiring Manager and you are onboarding a new Marketing Assistant.
Your tasks to complete the onboarding would then include
Create new contract
Order new computer
First, you create your origin issue which you’ll call Hiring a Marketing Assistant. Instead of manually creating linked issues and copying/setting field values, JSU’s New Set of Operations can help automate these tasks.
On adding the "Create Linked Issue" post-function to the "In progress" transition, configure the fields you prefer with the help of the three New JSU operations:
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
First, you can copy a field from the origin to the new issue. Let's copy the assignee of the task to the assignee of the sub-task. Then, you can copy a value from a field of the origin issue to another field of the origin issue. We'll try it by copying the summary to the description and prepending it with a dash. Configure the last operation by setting a value for the summary of the new issue. We'll set it to "Create contract"
When you are done with your configuration, add your post function. You can do the same for as many sub-tasks as you want to have automatically created. Finally, publish your workflow and go back to your issue. Put it in progress and see the magic of the JSU's new set of operations!
Position of the Post Function
You can use this post function in the create transition (transition leading to Status "Open"), but you have to make sure to position the post function after "Creates the issue originally" and before "Re-index an issue to keep indexes in sync with the database.". As the create transition behaves differently than other transitions, the copying and/or moving attachment and copy field within the same issuefunctionalities are not available in this case.
In any case, if you use 'Move Attachment' (see below) you must position the post function before 'Update change history for an issue and store the issue in the database.'
You can add this post function several times in one transition.