I have previously developed code to create an issue to Jira using API.
It was developed using Jira API, C#, JSON and HttpWebRequest.
A new requirement to include 2 custom fields has caused this question. The fields are both of type Text Field (single line). When I include the custom fields in my JSON data line, I get "The remote server returned an error: (400) Bad Request." error from the server.
My assumption is that my logic using HttpWebRequest in C# is sound, because I can create an issue without including the custom fields without error.
Please review the below JSON data line and tell me what I have done wrong, or whether this can be done using Jira API.
{
"fields":
{
"project":
{
"key":"TP"
},
"summary":"Test using custom fields",
"description":"Test creating issue with 2 custom fields.",
"issuetype":
{
"name":"Task"
},
"customfield_10901": "Test 2",
"customfield_10902": "Test 1"
}
}
Thank you.