Hi everyone,
in Jira 9+ all Transition-Buttons are now inside a Workflow-Dropdown.
We don´t really mind this but in some cases/projects we really want to separate a button and put it right next to the Workflow-Dropdown or the Assign-Button.
On top of that we like to create a second button which do something else like redirect to a link. This should be possible with Scriptrunner Fragments but i wasn't able to create something like this. I kinda have now two questions regarding buttons:
1 - Is there a solution to set a transition-Button next to the transistion-dropdown? Maybe using fragments? Dont really want to buy another third-party app.
2 - Using fragments is it possible to create a "custom-web-item-Button" right next to the transition-dropdown?
In the fragments configuration there is field "What section should this go in" with dozens of options. With the option "jira.issue.tools" i was able to create a button but it is... well next to the tools buttons in the issue view. Not exactly what i want. Anyone some ideas?
Thanks!
Cheers
Adam
Hi @Adam Laskowski ,
You can add buttons to that area by setting the location to "operations-restore". For example:
Which results in this:
Does this meet your needs?
Kind regards,
Bobby
wow that`s it!
"operations-restore" is the right option and it works like a charm.
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. I'm also interested in this. I managed to create the button but how do I get that button to open a screen from the transition drop-down? Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't just trigger a regular jira screen from a custom web item (button).
If you want the button to prompt users for input, you will need to set that web item to "Run Code and Display a Dialog".
That "run code" will have to be a custom REST enpoint that generates all the HTML for a dialog with whatever input fields you want.
Then that dialog will have to include some javascript to trigger the desired action either via another customer POST rest API endpoint or built-in rest apis.
You would basically be building your own application on top of Jira.
You can read more about this here: https://docs.adaptavist.com/sr4js/latest/features/script-fragments/custom-fragments/web-item#dialogs-advanced
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Robert Bailey Thanks, that helped me also.
I have two questions related to this:
Can I add also an icon to that button?
Background information: I want actually to show customized screens for the "Edit". Therefore I would like to remove the original "Edit" Button (on the left in your screenshot) and use my own button, but also add the icon.
Second is: can I define the position of the button? Can I move it completely to the left (instead of the original "Edit"-Button) for example?
Thanks and best regards,
Dali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dalibor Gasevic ,
Apologies for the delayed response. I have looked into this and its not quite possible to do exactly what you need. It is possible to hide the edit button, but it is not possible to add a new button there or have the 'edit' icon available.
The closest I could get was to the right of the 'Add comment' button. It looks like the section that contains the edit button is not available to us.
I have attached these screenshots to show you what is possible:
I hope this helps!
Kind regards,
Bobby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.