Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

ScriptRunner Fragment - Code to crate Issue/Subtask

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.
Nov 06, 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.
Nov 06, 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

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