Hi,
I am wondering if I am the first guy who is asking for that, but it seems it's maybe a special request ;)
If it's possible to create a new component by REST API, only if it's not an already existing component? This should be handeled in one request.
Is there an example available?
Uh that was fast, thank you! ;)
I know this page, but unfortunately I don't understand....
{ "fields": { "project": { "key": "TST"}, "parent": { "key": "[entry.JIRAKey]"}, "summary": "[entry.subtask1] | [entry.typecode1]", "description": "[entry.description1]", "components": [{"name": "[entry.subtask1]"}], "issuetype": { "id": "5"}, "reporter": { "name": "[entry.user]"} } }
At the moment, I use the code above and it's working to set the component if this is already existing, but if it's a new component I got an error message Component name 'xxxxxxx' is not valid.
The question for me was, how can I implement that the "new component" will be set?! I guess the problem is my lack of JSON knowledge... :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How are you using the REST API? In which language?
For testing the end point you can use curl command or use the Atlassian REST API Browser or use browser plugin to test REST API.
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use it in combination with Confluence / ConfiForms. I fire a IFTTT macro to create Jira issue (like shown in the code above). The language is JSON.
It works in general, but only if the component is already created. Now I am searching for an option to do this in one sweep e.g. create a new component if the used isn't existing.
To be honest, I am not am programmer and have less JSON knowledge, but I guess you recognized that already :D
Anyway, I appreciate that you try to supprt me in this case!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.