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

I want to create a button in Jira Cloud using Scriptrunner that is visible to specific roles.

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?Screenshot 2023-11-21 102557.png

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 20, 2023

Hello @Ankush Das 

Disclaimer: I have not worked with the ScriptRunner Fragment feature.

 

Reviewing the ScriptRunner documentation on Script Fragments:

https://docs.adaptavist.com/sr4jc/latest/features/script-fragments

... I see a link to a YouTube video that demonstrates adding a button.

https://www.youtube.com/watch?v=1WdCDhY2OXw

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.

Screenshot 2023-11-21 132201.png

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.


Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 21, 2023 • edited

Hi Ankush,

ScriptRunner for Jira cloud can display custom HTML, CSS and Javascript, which means you could write some custom HTML hosted somewhere externally, such as CodePen as mentioned in the documentation here.

This custom HTML CSS and Javascript would define the logic to create the button that you require and you would then reference this in the fragment to have the button displayed on the issue.

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.

Regards,

Kristian

Like Ankush Das likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 22, 2023

@Ankush Das 

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?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 22, 2023

@Ankush Das 

@Kristian Walker _Adaptavist_ answered that question:

ScriptRunner for Jira cloud can display custom HTML, CSS and Javascript, which means you could write some custom HTML hosted somewhere externally, such as CodePen as mentioned in the documentationhere.

This custom HTML CSS and Javascript would define the logic to create the button that you require and you would then reference this in the fragment to have the button displayed on the issue.

I don't work with script fragments so I cannot tell you exactly what that code would be.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events