Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any groovy script to clone a jira issue and add the custom fields .

Anunna Mandal September 8, 2020

We are trying to create Jira issue from mail id , but the issue that gets created only have basic fields populated. It doesnot create any custom field for the issue. Is it Possible to add any details in the mail that the jira will pickup as the custom field in th jira issue .

 We tried another way and  created a groovy script and added custom fields which need to be appeared when it will copy the issue created from mail and create a same issue with all the custom field added.

The groovy script is able to copy and create the issue but not the custom fields are not getting appeared still in the new copied issue.

Can Anyone help here 

Thanks

1 answer

0 votes
Iago Docando
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.
September 8, 2020

Are you by any chance trying to create a new issue in a different project than the original issue??

Is so, have you checked the field configuration schema of the new project? Maybe those custom fields you're missing are just not allowed in the new project.

Anunna Mandal September 8, 2020

No, the new issue also is getting created in the same project as of the existing issue.

The custom fields are part of the screen scheme for the project in which we are trying to create the new issue.

Iago Docando
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.
September 8, 2020

What about retrieving your issue data (ALL) via API and then create the new one via API as well simply copying the whole json structure?? (minus the key itself and so on, and the any fields you're not interested in... naturally)

Suggest an answer

Log in or Sign up to answer