Copy field value from issue to create sub task screen

Ken Loh April 19, 2023

Dear Sir/Madam

May I know it's possible that copy field value from issue to create sub-task automatically?

As example on below screenshots: Department in issue is Team 10, and I wish Team 10 can copy to Create Sub-Task screen.

Ken

testingA.png

testingB.png

2 answers

2 accepted

5 votes
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

@Ken Loh -

In the automation rule, you will need to update the Edit Issue action as follow -

1) Click on the "..." icon and select Copy from option.

2023-04-19_22-51-10.png

2) Once it is done, click in the "Copy xxx from Current issue" box and change the Current issue to Parent issue.-

2023-04-19_22-51-26.png

2023-04-19_22-51-43.png

Afterward, save the automation rule and publish it.  You are all set.  Please note that in my example, I was copying the Due Date field from Parent to the Subtask.  In addition, you want to make sure the your Department field custom dropdown option context is also applicable for the Subtask issue type in your project.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Ken Loh April 19, 2023

Dear Joseph

Thank you for your replied. For trigger, I have selected "Created Subtasks (Field)", may I know is this the correct setting?

Ken

testingC.png

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2023

@Ken Loh -

The triggering event is not correct, you should use issue created event and add the condition to see if the issue type is a subtask or not.  If so, then update the subtask's department field by copying it from the parent issue.

Another thing, your field "Create Subtasks" seems to be a custom field that your admin created and it is not a default out of the box setup.

Hope this helps.

Best, Joseph

Ken Loh April 20, 2023

Thank you Joseph. Is there a way to copy field value during the sub task creation, not after created? Because currently the field is required, we need to select the value before create it. And we would like to copy it automatically, no need to select it manually.

Ken

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2023

@Ken Loh -

What you need to do then to make the field for subtask (optional) and then just use the automation rule to populate the field since you always want the field to pull (copy from) from the parent issue.

In addition, you should also remove the field out from the Create Issue screen for the subtask issue type.  Again, the field will always be get its value from the parent issue.

Hope this helps.

Best, Joseph

Ken Loh April 23, 2023

Thank you Joseph.

1 vote
Answer accepted
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hello @Ken Loh ,

I noticed you have Jira Service Management Server - if you have the Automation for Jira application installed on your instance, you can copy the value using an automation rule.

Similarly, if you have a scripting application already installed (Scriptrunner, PowerScripts, etc), you can write a custom script that triggers whenever a sub-task is created or something along those lines.

If neither of these applications are already installed on your Server environment, you'll have to move to Data Center first and then purchase one of these applications, as you are no longer to purchase applications for the Server environment.

Hope this helps!

Ken Loh April 19, 2023

Hello @Sam Nadarajan 

Thank you for your replied, yes, I have project automation on project settings.

However, there is only "create sub task" in new action.

Ken

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Thanks for clarifying! It's good that you have Automation.

You can't copy the value from the parent issue into the sub-task issue when you launch the Create Issue screen - you would need Scriptrunner Behaviours for that.

However, you can update the Department field after the sub-task is created with the value from the Parent ticket using an automation rule that looks similar to below:

Screen Shot 2023-04-19 at 11.22.14 PM.png

For the Action, select "Edit Issue" instead of "Create Sub-Task." In the Edit Issue, select your Department field. Then click the triple dots on the right side and select "Copy" and then select "Parent Issue".

Hope this Helps

niranjan October 30, 2023

Hello @Sam Nadarajan 

I have similar issue but different custom field (Quote price - text field).

Can you please share the executable code for script runner behavior ? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events