Specifically, I want to automatically create Issue A when another issue (Issue B) transitions to Status C on Jira DC. During the creation of Issue A, the automation should copy data from Issue B into Issue A.
I’m currently using ScriptRunner to handle the logic. However, the automation creates Issue A first and only then populates the fields. Some of those fields are required, so Jira blocks the issue creation before the values can be copied over.
Is there a way to populate required fields at creation time (or otherwise work around this limitation) so that the issue can be created successfully?
Hello @Phương Hoàng Thị Mai ,
You could use a Jira automation to achieve this.
The key point is that, in the clone work item action, you must select all fields that are required for issue creation and ensure they are copied from the original issue.
Here is an example:
Would Jira automation work for you?
Unfortunately, I’m currently using Jira Data Center, so I’m not sure whether your instructions apply. Is there any workaround or alternative approach for Jira DC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Phương Hoàng Thị Mai ,
I believe it is also possible to use this action in automations for Jira Data Center. Here is a link to an offical Atlassian document about cloning issues in Data Center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must use IssueInputParameters to collect all the data (including required fields) in one place before calling the create command.
Do not create the issue first and then try to set the values, as this will fail Jira's validation checks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As an alternative to ScriptRunner, I can suggest trying our app Elements Copy & Sync. It will create the target issue and injects field values in the same operation, instead of “creating first, updating later”.
These are the steps you should follow to configure the app:
Go to Administration → Manage apps → Elements Copy & Sync → Operations
Click Add operation
Choose Create a local issue
Configure:
Target project (where Issue A will be created)
Target issue type (Issue A type)
In the same operation, configure the Fields section:
Copy values from Issue B → Issue A for all required fields
(Summary, Description, Priority, custom required fields, etc.)
For required fields that should not be copied, set:
A static/default value, or
A value based on another field
Edit the workflow used by Issue B
On the transition that moves Issue B to Status C, add a Post-function
Select Elements Copy & Sync: Create and link issue
Choose the operation you created
Publish the workflow
You can find all the detailed steps here in the documentation.
Let me know if you have any question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the relation between issue A and issue B? (Parent/Child)
Little bit elaboration will help.
Best,
Fadoua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.