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

Automation for Jira clone issue with custom fields

Valdis June 7, 2019

I'm trying to crate a rule where the issue is cloned to another project.

Both projects has the same mandatory 2 custom fields.

By default, the Clone Issue does not clone custom fields with its values and therefore fails, so I'm wondering could someone help me here.

image.png

I've added JSONView and the fields on original task are below:

fields{

customfield_10802: "ABC",

customfield_10807: "Distribution",

names: {

customfield_10802: "System",

customfield_10807: "Module",

 

The question is, how can I clone the issue with both customfields and their values?

3 answers

1 accepted

1 vote
Answer accepted
Valdis June 12, 2019

I was able to fix this by adding following under More Options:

 

{
"fields":
{
"customfield_10802":"{{issue.customfield_10802}}",
"customfield_10807":"{{issue.customfield_10807}}"

}
}

 

That's it.

1 vote
Scott Harwood
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.
June 9, 2019

Hi Valdis,

This should work without you having to supply any additional configuration. However you will need to have the destination project in the "Restrict to projects" field in the rule details. 

Cheers,

Scott.

Valdis June 10, 2019

Nah, still fails. :(

I added both projects in "Restrict to projects"

Source is Service Desk project, other is Jira Software project..

 

Clone issue

Error creating issueSystem is required. (customfield_10802), Module is required. (customfield_10807)

Valdis June 10, 2019

It even fails to clone the the issue in the same project:

 

image.png

Valdis June 12, 2019

@Scott Harwood  response from the support was:

There are some limitations with our cloning functionality, but I believe copying custom fields should work.

But only way I did fix it, was adding JSON Script to set the values.

1 vote
Lucas Rodrigues de Oliveira
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.
June 7, 2019

Hi Valdis,

 

put all custom fields you need to copy in a view screen, the fields need be on a screen of the destination issue.  

Valdis June 7, 2019

Hi Lucas,
I'm not sure I got what you mean.

Both fields are on create issue screen and required while creating the issue in source and destination project.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events