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!!!