I am creating a form to allow user to create issue in Jira from my website.
I am checking the request form on this page:
https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-issueLinkType-get
And found following format:
"fields": { "project": { "id": "10000" },
"assignee": { "name": "homer" }
"timetracking": { "originalEstimate": "10", "remainingEstimate": "5" }
}
Now here project takes `id` as key, assignee takes `name`, timetracking taking multiple keys.
How can I decide what to send in request? Either there should be standard format like, sending only ids. Or provide in API that what format this field should be sent to.
Also for custom field, format is different:
"customfield_30000": [ "10000", "10002" ], "customfield_80000": { "value": "red" }, "customfield_20000": "06/Jul/11 3:25 PM",
For some it is taking array, and object with key value, and even string.
This the response of my custom field radio button:
Here I don't know how should I send my radio values. As object like:
"customfield_80000": { "id": "customfield_80000" }
Or as array values, or id as string.
I need to write some generic code to handle all the possible fields.
I am already getting the meta data for fields. Check devtool screenshot attached in above description.
My issue is while sending the user inputs to jira to create issue, there is no fix format.
Like for project field it is accepting {id: }, for assignee {name:}. How will I know that which key name should I send. (Id or name). Or which type of data should I send for fields (Array or Object).
How can I write some generic code to send user entered data to JIRA?
Plus there are so many fields including custom fields as well.
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.