You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I want to create a button in Jira Cloud using Scriptrunner that is visible to specific roles. Upon clicking this button, I want it to execute a particular script.
After installing Script Runner for Cloud, I am using Script Fragments to create a button. While creating script fragments, I am not getting any options except Web Panel. How can I achieve this functionality?
Hello @Ankush Das
Disclaimer: I have not worked with the ScriptRunner Fragment feature.
Reviewing the ScriptRunner documentation on Script Fragments:
... I see a link to a YouTube video that demonstrates adding a button.
In that demo they show selecting WebPanel for the Fragment type, so I don't think that there is a Fragment Type specifically for Button.
However, as the demo proceeds they do show that what was created does produce a button.
Hi @Trudy Claspill ,
In Jira Cloud, using Script Fragments, I can display an external page, similar to displaying a wiki page in the screenshot.
However, I am unable to create a button as demonstrated in the video or in documentation.
ScriptRunner for Jira - Button on release page using Script Fragments
Creating buttons and REST Endpoints in Jira
I am not seeing these options in Jira Cloud.
If you need to communicate with Jira to get data out, you must use the Adaptavist Bridge, as documented here.
If you need further assistance, I would advise raising a support request here.
I hope this helps.
Speaking to your response that you don't see the same options in your Jira Cloud instance that you see in the demo video and the documents you referenced, be advised that both of those are references for self-hosted Jira (Jira Server or Jira Data Center), not Jira Cloud. The options in Jira Cloud are different.
You can tell that the demo video is not for Jira Cloud by looking at the URL shown in the browser window in the video. It shows "https://localhost:8080". If it was a Jira Cloud instance it would show a URL like "https://someCompany.atlassian.net". All Jira Cloud instances have a URL in the atlassian.net domain.
Hi @Trudy Claspill ,
Thanks for your response. I understand that the options differ between Jira Cloud and Jira Server/Data Center. Could you please clarify if it's possible to access similar options in Jira Cloud? If so, how can I do that? If not, what is the alternative method for creating a button visible to specific roles?
Additionally, are these options available in Jira Enterprise versions?
@Kristian Walker _Adaptavist_ answered that question:
I don't work with script fragments so I cannot tell you exactly what that code would be.