I'm using Confiforms to try and build a WebService Request to try and create a set of tasks based on the number of items that the user supplies into a Text field. The Text field format should be a comma separated list, and is stored in "TestScriptsToRun".
I have all the linkages working, and am able to submit single creates, but I can't get the bulk to work...
Here's my code.
{
"issueUpdates":[
#set($TSToRun = "[entry.TestScriptsToRun.split(,).toArray(')]")
#foreach ($script in $TSToRun)
{
"fields": {
"project":
{
"key": "PRJT"
},
"summary": "Run $script for [entry.SourceStory.key]",
"components": [{"name": "Software"}],
"description": "\n\n**Automatically Generated from Confluence**\n\n",
"labels": [ "AutomatedTask" ],
"issuetype": {
"name": "Story"
}
}
#if($script != $TSToRun.get())
},
#end
#end
}
]
}
Here is the error I receive.
- Requested to https://<serveraddress>/rest/api/2/issue/bulk has resulted in an error. Response code = 400 (method ='POST'). Response contents: {"errorMessages":["Unexpected close marker '}': expected ']' (for ARRAY starting at [Source: org.apache.catalina.connector.CoyoteInputStream@13dc366; line: 2, column: 4])\n at [Source: org.apache.catalina.connector.CoyoteInputStream@13dc366; line: 5, column: 3]"]}
Thanks for your help!