When a form submission is submitted it is triggering a power automate flow to run. In that flow I am using the HTTP/API tool to create a JIRA issue. All of that works fine, the issue gets created but not all fields are populated even though the flow doesn't fail or produce errors.
The HTTP tool uses https://odwlogistics.atlassian.net/rest/api/3/issue/ as the URI, it is using basic auth with an API key, again all that works. Many of the custom fields are paragraph fields in JIRA. For example:
customfield_11051 is a jira paragraph field and it updates properly based on
"customfield_11051": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/68']}",
"type": "text"
XML for this field
<customfield id="customfield_11051" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
<customfieldname>General Manager</customfieldname>
<customfieldvalues>
<customfieldvalue><p>GM Name</p></customfieldvalue>
</customfieldvalues>
</customfield>
customfield_11073 is another paragraph field but it does not update based on
"customfield_11073": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/84']}",
"type": "text"
XML for this field
<customfield id="customfield_11073" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
<customfieldname>New or Revision Other Response</customfieldname>
<customfieldvalues>
<customfieldvalue><p>Revision Other</p></customfieldvalue>
</customfieldvalues>
</customfield>
The text @{triggerOutputs()?['body/68']} and similar is the power automate field that is being used to populate that text. I have confirmed via power automate that each of these fields is outputting text/strings which is what I would expect the paragraph fields to look for as input.
Here is the full JSON body I am sending via the API tool.
Working fields:
Summary, description, issue type, customfield_11051, customfield_10879, customfield_11046, customfield_11048, customfield_11050, customfield_11052, customfield_11053
Fields not working:
customfield_11073, customfield_11075, customfield_11074, customfield_11049
{
"fields": {
"project": {
"key": "ABI"
},
"summary": "@{triggerOutputs()?['body/71']}",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/72']}",
"type": "text"
}
]
}
]
},
"issuetype": {
"name": "Report"
},
"customfield_11046": {
"value": "@{triggerOutputs()?['body/82']}"
},
"customfield_10879": {
"value": "@{triggerOutputs()?['body/20']}"
},
"customfield_11048": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/74']}",
"type": "text"
}
]
}
]
},
"customfield_11050": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/75']}",
"type": "text"
}
]
}
]
},
"customfield_11052": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/76']}",
"type": "text"
}
]
}
]
},
"customfield_11053": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/77']}",
"type": "text"
}
]
}
]
},
"customfield_11051": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/68']}",
"type": "text"
}
]
}
]
}
},
"customfield_11073": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/84']}",
"type": "text"
}
]
}
]
},
"customfield_11075": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/85']}",
"type": "text"
}
]
}
]
},
"customfield_11074": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "@{triggerOutputs()?['body/86']}",
"type": "text"
}
]
}
]
},
"customfield_11049": {
"value": "@{triggerOutputs()?['body/60']}"
}
}
It looks like your JSON payload is malformed due to misplaced custom fields.
In the screenshots below, you'll see that customfield_11073, customfield_11075, customfield_11074, and customfield_11049 are defined outside the fields object. This breaks the expected schema for the Jira API.
Specifically, when Jira attempts to process fields.customfield_11073 (for example), it returns undefined because the key isn't actually inside the fields object—it’s on the same level as fields, which is invalid.
Thanks, I am new to JSON and didn't realize it wasn't formatted properly. Power automate API tool will often warn if the JSON isn't right but it may not know specifics of how jira wants it formatted. I tried lining them all up like in your second screenshot but now I get an invalid input error when I run the flow. Checking to see where I might have made a mistake but not totally sure if I lined them up right either.
Update: I did just remove everything below issue type in the JSON and then only added the section for customfield_11073 and when it created the issue it did populate the 11073 field on the issue. I just need to figure out how to format it to get them all to work now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got it sorted out, everything is now populating properly except for 3 fields which are different issues that I will make a new post about so as not to mix another issue into this post. Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Bronowski Here is a link to a github jist with the JSON formatted updated if you still need .. thought that I linked this in my reply yesterday but seems like it didn't make it in
https://gist.githubusercontent.com/alexCevi/1c4f9bb9959892d907d68cf574072bcc/raw/9607c4ffc9d82c07205bf585f0f4e9c652d45465/fixedPayload.json
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mike Fisher ,
Welcome to Atlassian Community!
For the paragraph custom fields that are not set, what rendering is used for those? Are they set to the default one or are they wiki style? You can see what rendering they are using by going to Project settings > Work items > Fields. From here locate the field and look at what renderer is used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not finding the place to see the renderer. Below is the details from one of my fields. I did create these under a team managed project. I'm new-ish to jira, not sure if this changes how I find the renderer or if it's even possible to find. That being said I built all these custom field and all I had to do was choose the type (paragraph) a name and a description. I saw no option to choose a renderer during creation and since I created them all the same I assume they would all be the same.
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.