ScriptRunner Fragment - Code to crate Issue/Subtask

Peter Ellis November 6, 2023

Hi,

I have created a ScriptRunner fragment to display a button or menu item within a particular project. I have been trying to find the code to create either a new issue or a subtask when button or menu item is selected, without much success. Can anyone help?  

2 answers

0 votes
Robert Bailey
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.
November 6, 2023

Hi @Peter Ellis , 

You can achieve this by using two features of ScriptRunner for Jira. With fragments you can add the button as you already know, and then with Custom Rest Endpoints you can create an endpoint to create an issue, and point to that endpoint from your fragment. 

Does this help?

Kind regards, 

Bobby

0 votes
Marko Blagus
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.
November 6, 2023

Hello @Peter Ellis

 

Why do you want to add another button to create new issue if you already have one?

Did you check these two documentations: link, link.

 

Best regards,

Marko Blagus

Peter Ellis November 6, 2023

Hi Marko,

Yes, I have seen those links, they don't help me.

You are absolutely right why duplicate a function that is already there? We have a large number of new uses that have been using another app that have moved over to Jira. To accommodate them we require either dedicated buttons or menu entries to create the new issues directly. 

I can use the 'Constrained Create Issue Dialog' in Script Runner to present the new issue dialog but I also need it to create subtasks which the dialog wont do. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events