I am using a form submission to trigger a power automate flow. The flow uses the field responses from the submission to populate a JSON payload which is fed into power automates HTTP/API tool. I had some JSON formatting issues causing trouble but that was resolved in this post. https://community.atlassian.com/forums/Jira-questions/Using-power-automate-HTTP-API-tool-to-create-issue-Some/qaq-p/3032719#M1127833
The other issue I am having is with a Short text (plain text only) field causing an error because it needs to be a string format. I also have 2 other Checkbox fields that cause an error because the output needs to be in an array.
I used power automate functions to convert the short text field output into a string but it still errors saying it needs to be a string format. Similarly I used the split function to turn the checkbox outputs into arrays but again it still errors saying they need to be arrays. I'm suspecting it has more to do with formatting code in the JSON payload itself, for the string especially. The checkboxes I could see how it wants them in an array and maybe I'm just not providing it exactly what it needs.
Below is the XML from a a jira issue where I manually populated the requester field
<customfield id="customfield_10049" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
<customfieldname>Requester</customfieldname>
<customfieldvalues>
<customfieldvalue>Mike</customfieldvalue>
</customfieldvalues>
</customfield>
And this is the XML for the checkbox fields
<customfield id="customfield_10909" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
<customfieldname>Delivery Method</customfieldname>
<customfieldvalues>
<customfieldvalue key="11944">Pull on Demand</customfieldvalue>
</customfieldvalues>
</customfield>
and
<customfield id="customfield_11040" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
<customfieldname>Report Frequency</customfieldname>
<customfieldvalues>
<customfieldvalue key="12038">Hourly</customfieldvalue>
</customfieldvalues>
</customfield>
Based on the "key" I am guessing these need to be in an array as key value pairs. The output for the checkbox fields look like this for one and similar for the other
The power automate GUI shows the output as:
"Report Frequency": "Specify the value for Report Frequency in an array",
"Delivery Method": "Specify the value for Delivery Method in an array"
Thanks!!!
In Jira Cloud’s REST API, the format for custom field values depends on the field type. For a plain text field (type `textfield`), the payload must pass the raw string directly, not wrapped in an object with `value`. For example, `"customfield_10049": "Mike"` is valid, whereas `"customfield_10049": { "value": "Mike" }` will trigger the “must be a string” error because Jira is expecting the field’s value as a primitive string in the JSON ([Create issue API docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post)).
For Jira Cloud’s REST API, the JSON payload for custom fields must match the field’s storage type. A short text field uses the `string` type directly, so it should be sent as `"customfield_10049": "Mike"` rather than wrapped in an object with `value` — that object format is for option-based fields like single/multi-selects. The “Operation value must be a string” error occurs when the API sees an object where it expects a raw string ([Create issue example](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post)).
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.