How to add a custom Button to the Release page?

Alexander December 24, 2020

Hi there.

Maybe somebody could advise how we can add a Custom button to the Release page?

See the screenshot where we want to do it.

Seems like it's impossible to make some changes to the Release page.

I've tried to find a Web Fragment UI via Web Fragment Finder addon and when I try to open a page with one of our Release this Addon shows me an error.

2020-12-25_073136.jpg

 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Ravi Sagar _Sparxsys_
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.
December 25, 2020

Hi @Alexander 

You can add a web panel at this location.

location='atl.jira.releasereport.top.right.panels'

I hope it helps.

Ravi

Alexander December 27, 2020

Hi @Ravi Sagar _Sparxsys_ 

Tried to add a web panel but received an error below.

Maybe you know how to fix it?

Error

Required resource with name 'view' does not exist.

Alexander December 27, 2020

Also, I don't understand what I should do step-by-step... 

At first, create a web panel and then create a web item (button) or what? And how? Usinf Script Runner?

Please, advise.

Ravi Sagar _Sparxsys_
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.
December 28, 2020

Hi @Alexander 

If you have ScriptRunner then you can use Script Fragments to insert a web panel at that location.

Check this screenshot.

Screenshot 2020-12-28 at 10.12.15.pngNow what you want to do when someone clicks on it is upto you to configure. I shared the link above where you can find examples.

You will also find few more examples in our script library.

Ravi

Like Alexander likes this
Alexander December 28, 2020

@Ravi Sagar _Sparxsys_ thanks for your feedback.

Difficult for me, cause I don't know Java.

Could you, please, advise how we can add a button to this web panel. After someone will click this button  he will be redirected to some link 

Ravi Sagar _Sparxsys_
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.
December 28, 2020

In the Provider class/script copy this code snippet.

writer.write("<a href=\"https://www.ravisagar.in\" class=\" aui-button aui-button-primary \" style=\" margin-right: 2px;\" >My site</a>")

This will create a link and make it look like a button and it will look exactly like the release button. Change the link and the link text to suit your needs.

It will look like this.

Screenshot 2020-12-28 at 13.33.38.png

I hope it helps.

Ravi

Like Alexander likes this
Alexander December 28, 2020

@Ravi Sagar _Sparxsys_ you are awesome!

What do you think, can we trigger a webhook via this button?

We have a webhook that runs while we click on the Release button and choose data. Then webhook runs a script that creates a Change Request in our Service Desk system.

Like Ravi Sagar _Sparxsys_ likes this
Ravi Sagar _Sparxsys_
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.
December 28, 2020

Yes you can. For sending the data I believe you need to do a bit more in your script than just the url.

Also take a look at Custom REST End point that you can create using ScriptRunner.

Ravi

Alexander December 28, 2020

Seems like we should add the same functional like a Release button have: click the button => Choose date => Release status will change to Released

Alexander December 28, 2020

@Ravi Sagar _Sparxsys_ Hello! Can we add the same function like a Release button have: click the button => Choose date => Release status will change to Released? What do you think?

Our Webhook post script checks the releases with a Released status. So, at first we need to change a status of release via our custom button

Alexander December 28, 2020

UPDATE

We need to change status via our custom button to "somestatus" => then Webhook running a script

Ravi Sagar _Sparxsys_
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.
December 29, 2020

Apart from the links I shared above you will find plenty of examples in the script library to transition an issue.

Alexander April 20, 2021

Hello.

Could you, please, advise on how we can change a Release Description via this custom button?

Alexander April 21, 2021

Maybe we can use some script (Rest endpoint)?

Alexander July 15, 2021

Hi.

Any updates here?

TAGS
AUG Leaders

Atlassian Community Events