Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Automation, copy Component/s and Security level from epic

Fabian Schöllhammer January 21, 2019

Hello everyone

 

I want to use Jira automation to edit values in the Task.

That is what i have configured.

1.JPG

2.JPG

My Epics do have both values and i dont get any error message in the Jira Automation Log, still my Tasks (which are linked to the Epic) do not have any value in COmponent or Security Level.

Any idears what im doing wrong ?

 

Thanks in advance!

 

 

3 answers

1 accepted

1 vote
Answer accepted
Albert Manuel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2021

@Sara Watson did you solved this?

Sara Watson March 10, 2021

@Albert Manuel No, I did not. Would be really great if there was a way to do it though!

Börge Zuber
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2021

{
"update": {
"components": [
{{#issue.epic.components}}
{ "add": {"name":"{{name}}"} } {{^last}},{{/}}
{{/}}
]
}
}

Like Yordan Yordanov likes this
Mark Hanson
Contributor
June 23, 2021

That works; thanks.

Yordan Yordanov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 30, 2023

Thanks @Börge Zuber !

The only comment to future readers is that when setting up the Edit issue step, don't select Components from the list, just paste the script into the container that appears after clicking on More options.

Screenshot 2023-11-30 134113.png

Like Börge Zuber likes this
0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2020

Hello @Sara Watson and @Kashif Ansari

Thank you for reaching out.

Some smart values changed since my last answer. Please. try the syntax below as mentioned in this documentation:

{{issue.epic.customfield_10001}}
{{issue.epic.components}} 

If it does not work, please ensure the field you are trying to edit is properly added to the edit issue screen of both parent and child issues.

Let us know if you have any questions.

Sara Watson October 30, 2020

@Petter Gonçalves This is still not working for me. Is there more that needs to be added to the JSON to tell it to copy the field from the epic to the child issue (using "fields" or "update" maybe)? The error message I received this time said "Error while parsing additional fields. Not valid JSON.". See screenshot below of the rule as it exists now. 

The custom field I am using in this case is "Team", which was setup in the project plan. I used <https://projecturl/rest/api/2/issue/issuekey?expand=names> to verify the custom field ID. 

The Team is set in the epic but not in the child issue. The goal is to automate that selection so that anytime we are creating an issue from the epic, the child issue takes on the Team as well. 

2020-10-30_13-03-38.png

Parisa Askarnejad January 14, 2021

Hi All,

I have a similar problem as Sara, I need to update the child's component based on the parent component. I am looking for a smart way to do this. if someone knows how to do this please share.

Thanks,

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2019

Hello Fabian,

These fields do not have a proper form control yet on Automation for JIRA plugin, so they can not be edited like you are trying to do, however, you can configure them using a valid JSON object in the advanced form under More Options, as described in the documentation below:

Advanced Fields

To achieve your need, you will need to use Smart values to add the proper security level and Component to your epic by using the following parameters: 

{{issue.parent.epic.security}}
{{issue.parent.epic.components}}

Please, check both documentation sent and let me know if you were able to configure the Automation. 

Kashif Ansari April 20, 2020 edited

I am trying to do a similar thing. Whenever an issue is updated, I want the automation to check the issue's epic component. If the epic's components field contains Technical then I would like to update the given issue's components field with that of the epic.


Here is what I am doing.


Screen Shot 2020-04-20 at 1.06.43 PM.png

Sara Watson October 29, 2020

Hi @Petter Gonçalves  can you help me with the Advanced Field Editing for the following:

When: Issue Created

Then: Edit Issue Fields (Copy customfield_10001 from epic}

The closest I have gotten (as in, not an error message that it's not a valid JSON) was 

{{issue.parent.epic.customfield_10001}}

but even that returned an error of : No fields or field values to edit for issues (could be due to some field values not existing in a given project). 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events