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
Next: Root
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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have created a custom web item in the form of a button using script fragments.
I require this button when clicked to load a Jira screen that is not set to any of the default actions (Create, Edit or View).
In theory this shouldn't be too hard as the feature described works with workflow transitions however I can not seem to get anything to work or find anything on the internet.
Does anybody have a solution that will allow me to link my button to a screen?
I know that it seems like it would not be all that hard ... but scriptrunner doesn't implement the same type of webwork actions that the built-in jira does.
So, what you would need to do, it using 100% custom groovy code, access the screen definition object to find the list of custom fields.
Then for each custom field, lookup the field type so you can prepare what the html UI will look like.
You'll probably need to look up some other configurations from the project such as the field configuration (maybe some fields on your screen should be hidden or required).
And then using all this, construct a custom htmls form using all the correct template for each of those fields.
Now, keep in mind, the button won't work by default. You'll need to create your own javascript to respond to the button click and submit REST api call to either the buil-in rest api or a custom on you build.
Ah, and don't expect scriptrunner behaviours to be active. They won't.
OR
The simple alternative, add a workflow transition from: "Any status" to: "itself". Associate the screen you want. Give the transition the name you want to see on the button.
Bonus features: you can use condition, validators and post functions.
This type of transition will not change the status and do exactly what you want.
The only downside is you might have to add this to multiple workflows.
For context we are looking to Clone tickets into projects based on a project value selected.
So I initially setup a test scenario using the workflow transitions and screens. I then created an automation rule however this would not work as there appears to be a bug which stops Insight custom fields from cloning.
I then looked into scriptrunner and setup the Listener that will clone a ticket. This copies all fields and works as expected, with one issue. Updating the field from the workflow transition screen appears to bypass the listener. Meaning I would have to add 4/5 post-function scripts to each workflow.
Do you know if there is a specific event I need to add for this? Currently I have it set to issue updated and condition is looking at the specific field (It works if I edit through the edit screen directly)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do like the idea of the custom button however at the moment the coding requirements for this piece of work is out of my skillset.
Is there anyway support could be provided to help achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use Clone Plus for this purpose: https://marketplace.atlassian.com/apps/44043/clone-plus-for-jira?hosting=server&tab=overview
You would probably spend more on consultancy fees to achieve the same purpose that that plugin would cost over the next 5 years.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another option would be our Jira cloud app Deep Clone for Jira.
From a developers perspective I agreee with @Peter-Dave Sheehan. Cloning and especially moving to other projects is not as trivial as it might seem :)
If you're interested in reading more about automate cloning with Deep Clone for Jira, you can have a look at our documentation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to clarify with you when you mentioned:-
I require this button when clicked to load a Jira screen
Do you want a dialog to appear went the Button is clicked?
Also, could you please share the current code and configuration that you are using?
Thank you and Kind Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have a transition with a screen behind it, when the button is clicked it will load up the screen and allow you to edit fields in that screen.
I would like my button to have the same behaviour, when clicked it loads a screen/dialog that allows me to edit values of fields and submit, changing the values in the ticket.
Looking at another answer this appears like it could be a bit of a headache to implement unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do really like the idea of the custom button however at the moment the coding requirements for this piece of work is out of my skillset.
Is there anyway support could be provided for this to help achieve the goal?
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.