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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,704
Community Members
 
Community Events
177
Community Groups

automation fails when copying a custom field from one project to another project

Edited

Using Automation, I want to create a ticket in Project B when a ticket in Project A is created. Both of these projects are TMP.   This works as expected until I add a custom field into the mix.  Each of the tickets are the same issue type with the same fields and has a custom field (dropdown) with the same name "Severity". 

Based on this error:

Found multiple fields with the same name and type: .
Severity (com.atlassian.jira.plugin.system.customfieldtypes:select)

It turns out that because both tickets have a custom field with the same name, it won't be copied. Changing the name of the field in one Project is not an option. 

I have tried to use json (more options->additional fields) to update the field in Project B but ( when I don't get a json parse error ) I get this error

Specify a valid 'id' or 'name' for Severity (customfield_10211)

this is my last try at the json where 10211 is the field in Project B and 10213 is the field in Project A

{
"update": {
"customfield_10211":
[{ "set":
[{"value": "{{issue.customfield_10213}}"}]
}]
}
}

My gut tells me I am trying to do the impossible.  Am I?

1 answer

0 votes
Curt Holley Community Leader May 19, 2022

Hi @Laura Engstrand 

Sounds like there is more than one "Severity" field in your Jira.

Are you not wanting to copy the same field? So your json would be;

{
"update": {
"customfield_10211":
[{ "set":
[{"value": "{{issue.customfield_10211}}"}]
}]
}
}

 

Also isn't the field/s available from the "Edit issue" action list of fields?

Screenshot 2022-05-20 091052.png

<a>

thank you for responding.


the Severity field is in the drop down list. Selecting that field out of the drop down was the first thing I tried but received this message


Found multiple fields with the same name and type: .
Severity (com.atlassian.jira.plugin.system.customfieldtypes:select)


which is why I tortured myself with json.
Each of these projects are team managed projects. As I understand that, each is an island onto itself. So yes, I created a custom field in each project called 'Severity' which is why there are two.


I did try the json you recommended but received this message which i am unsure how to interpret as I thought 'customfield_10211' is the id but am obviously incorrect


Error creating issue
Specify a valid 'id' or 'name' for Severity (customfield_10211)

</a>

Hi @Laura Engstrand 

Yes, and...to Curt's suggestions...

As you noted these are both team-managed projects, the custom fields are separate, even though they have the same names.  You may need to identify the different custom field ID values in the different project to copy the information.

Please take a look at this how-to for finding the smart values/custom id values, using example issues from each project.  Then use those ids in your JSON for the source/destination.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events