I want a Jira Automation rule to send a web request and create a new issue in another Project on a different site.
The problem I am facing is the description. Since the Description uses the ADF format it's hard to make a web request that will copy the description of the current issue when creating a new issue.
I almost got it, by making a webrequest first to get the current issue, then just copy the ADF formatted data from description field with {{webresponse.body.fields.Description}}
The problem is this doesn't look like valid Json anymore.
so it will look like
{version=1, type=doc, content=[{type=paragraph, content=[{type=text, text=This is just some sample text}]}]}
instead of this
{"version": 1, "type": "doc", "content": [{"type": "paragraph", "content": [{"type": "text", "text": "This is just some sample text"}]}]}
Any help would be appreciated if there are other ways to accomplish this!
Hello @Malcolm Hinds
How you are sending this data over to other Jira instance?
Jira has default "send issue data" and there is custom data. Can you clarify?
I usually send data across projects in same instance and I dont have this issue..
May be as a test, can you choose "Custom Data" and enforce json Encoding on the description field and test if its getting received correctly?
Please see below link:
Hi @Kalyan Sattaluri Thanks for helping out.
I am using a custom data, this is the web request I sent
And this is the error
This was the output of {{issue.description.jsonEncode}} that I had put in the comment to see the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, instead of
"description" : "{{issue.description}}",
have you tried below JSON in its place,
"description": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "{{issue.description.jsonEncode}}" } ] } ] },
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kalyan Sattaluri I tried to it like this before but didn't add .jsonEncode and would have errors when there was quotes and new line characters, But with it seems to work much better.
Was hoping there was a way to keep the Atlassian Document Format and keep some of the advanced formatting like code blocks, but this is good enough.
Thanks you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.