Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When User Clicks a Button, How Can I Make It Create an Issue Ticket

chrizpro March 24, 2019

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

 

1 answer

0 votes
Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2019

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

chrizpro March 25, 2019

Thanks Elifcan!

Suggest an answer

Log in or Sign up to answer