Automation for Jira copy value of custom field

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 9, 2021

Hi,

 

I'm kinda stuck, as this is the first time i use automation for jira with custom fields.

 

Basically i have a custom field called "CRM Company", the values of this field comes from a plugin called CRM for Jira and my problem is that i cannot find him in the list if i want to edit the field. Taking this in consideration, i have read that is possible to use the "More Options" from Automation to work with Custom Fields.

 

Now the flow goes like this: 

1) I create a epic, where i select a value for the custom field called CRM Company.

2) After this i create another ticket trough automation where i want to just copy the value of this CRM Company field to the next ticket.

 

I tried something like this: 

{
"fields": {
"customfield_10951": {{issue.customfield_10951.value}}
}
}

 

But still doesn't work, it gives me invalid json error... can somebody help me? How do i copy the value of a field in another ticket?

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2021

Hello @Albert Manuel 

Just to check the second part is automatically triggered by the first issue creation?

You can set to copy the value from the trigger issue in your configuration? 

You tried running this code you have scriptrunner?

BR, Olga

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 9, 2021

@Olga Videc  this is done directly in the Automation for Jira.

 

Yes the second part is automatically triggered by the first issue creation. No i haven't tried the Scrip runner because it suppose to work from Automation for Jira plugin directly.

Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2021

Hello Albert,

You don't need to script anything, you can copy it through automation.

Your second issue creation is triggered by issue created? 

Add edit issue choose "CRM Company" and choose "tree dots"

there you will find copy from - trigger issue.

I used deadline filed as example

Edit issue_1.PNGEdit issue_2.PNG

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

@Olga Videc it dosen't find me the field CRM Company, because i already tried that

Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2021

Hello Albert, 

I understand you need JSON to copy the filed value.

What type is your cf?

Also, here is a discussion about how to copy a field from trigger issue as JSON

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Copy-field-from-Trigger-issue-as-JSON/qaq-p/1529233

BR, Olga

Like # people like this
Himanshu Nanda May 9, 2021

Had the same issue - the link @Olga Videc mentioned seemed to have the answers, thank you!!! :)

Like Olga Videc likes this

Suggest an answer

Log in or Sign up to answer