Forums

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

clone issue description with RestAPI to other organisation

CYP December 16, 2023

What is the best way to clone issue descriptions from one organization to another?

The field description cannot be taken when the description includes images or RTF

Status 400 is returned to me 
'https://xxxxxx.atlassian.net/rest/api/3/issue/CY-2829

 

description sample 

 

{
"content": [
{
"content": [
{
"text": "test for clone",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [],
"type": "paragraph"
},
{
"content": [
{
"text": "Test for clone ",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "test for clone",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "Text 123456",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "text CDF",
"type": "text"
},
{
"type": "hardBreak"
},
{
"text": "test 1 abc",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [],
"type": "paragraph"
},
{
"content": [
{
"text": "test for clone",
"type": "text"
}
],
"type": "paragraph"
},
{
"attrs": {
"layout": "align-start"
},
"content": [
{
"attrs": {
"collection": "",
"height": 773,
"id": "bdad566b-9102-49e8-bd5a-61ae291ecec3",
"type": "external",
"url": "https://xxx-xxx--x.atlassian.net/rest/api/3/attachment/12750",
"width": 1825
},
"type": "media"
}
],
"type": "mediaSingle"
},
{
"content": [
{
"text": "test",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [],
"type": "paragraph"
},
{
"attrs": {
"layout": "align-start"
},
"content": [
{
"attrs": {
"collection": "",
"height": 431,
"id": "55290db9-8ab1-4eeb-b895-281423932768",
"type": "external",
"url": "https://xxx-xxx--x.atlassian.net/rest/api/3/attachment/12751",
"width": 636
},
"type": "media"
}
],
"type": "mediaSingle"
}
],
"type": "doc",
"version": 1
}

1 answer

0 votes
Jehan Bhathena
Community Champion
January 2, 2024

Hi @CYP ,

The easiest and the simplest way to clone the description from one Jira instance to another would be to use a Plugin from the marketplace (there are many that are designed to do this), while I understand this would incur additional cost, you may want to consider this given the simplicity it bring to the table, while you don't have to worry about random errors due to some new chars.

If you're looking to use the RestAPI, would suggest pairing it with the Jira Automation. This way you can use smart values as input in the Json Body, that will send over the raw text without the images. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.

PS: I've used Issue Sync Pro in the past, and it works quite smoothly for these use cases https://marketplace.atlassian.com/apps/1229958/issue-sync-pro?hosting=cloud&tab=pricing

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events