Hi,
I was assigned a task that required for an issue to be created when the user clicks on my custom button. From my understanding, I will need to do a POST. There were 2 ways that I saw, but don't really know how I want to put them together.
Firstly, I saw this:
https://scriptrunner.adaptavist.com/4.3.3/jira/rest-endpoints.html
where a priority is being created. Would be nice to see an example for how to do an issue.
Then I saw this one:
https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/
which is probably my preferred way, but I don't even know where I would put it or even how to do a POST request with Groovy. With a button, you call a link or a REST endpoint. Maybe I will put the code there (REST service endpoint)? Seems like a messy way of doing it. I would much rather put it in the button script, but you only can put conditionals there.
Thanks
Hello,
What do you mean by custom button? Is it a transition or a static button?
If it's a transition, you can do it by using postfunctions. If you are using script runner you can write a custom script that creates new issue add it to your transition.
If you want a static button I guess you need to write a custom plugin. Check out this link:
https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/
Regards,
Elifcan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.