Hello there =)
I would like to automatically create a dashboard when a project is created, the dashboard layout and gadgets would be the same for all of these dashboards, but they would display the informations for the project they have been created for. The project leader would be the creator of the dashboard, in order to be able to modify it.
I thought it may be possible to do this using triggers in PostreSQL, anyone can confirm ?
Is there a way to do it via JIRA ?
Thanks for any advice =)
There's a canned script in the Script Runner plugin that changes the ownership of a dashboard but you'd need to pull together your own Groovy script to copy a 'template' dashboard you've created.
You could probably stitch something together using Jamie's script here to push out a dashboard + the createBasedOnClone( ) method in the
PortalPageManager API.
Yes that would be a good start. I'd define a "template" dashboard, clone it, iterate through the gadgets and modify the filterOrProjectId parameter for each one to point to the newly created project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Buuhuu ;(
I just can't find out how to install this plugin...
I shutdown jira, copy the jar into the lib, restart jita, enable the plugin, and when I try to access the buttons to enter the script I get a 404 error ;(
HTTP Status 404 - Could not execute action [GroovyRunner]:groovy/lang/GroovyClassLoader
Also , the button label is shown as: item.groovy.runner.label , not the actual label , any clue ? =(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to add two jars, both in web-inf/lib. If you're stuck create a ticket in https://studio.plugins.atlassian.com/browse/GRV - a.a.c is not a good forum for this.
But note that it's not going to do magic for you - if you want to do this yourself you'll need a reasonable knowledge of the jira api and programming skills.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I got enough programming skills, but at the moment i have nowhere to type my code in.
Though it's true that I got no experience of the jira api.
But I need to do it anyway... sorry if I take your time =(
You say I must add two jars, but i got only 1 from the plugin, wich is the other one ?
Groovy works perfectly fine using groovyConsole...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As the installation instructions say, download 'groovy-runner.N.jar' and also a Groovy distro as well (from here), place both in WEB-INF/lib and restart JIRA.
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice thought, wish it were possible! There are so many database tables this would affect though that it's not practical to manage this directly in the database (plus you'd need a restart to pick up the changes) and I don't know of any way to do this in JIRA itself, so join the copy-dashboard-copy/edit-filters-update-gadgets club and remember that banging your head against a wall supposedly burns 150 calories an hour (which might be slightly more entertaining)!
(Unless there's a Script Runner script for this out there somewhere, well I can dream...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We won't need to restart if the database is not embedded right ?
Ah well, since u have to do it for my work placement i'll just do it in javascript
, are you interested in the result ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd love to know if you manage to get something working!
WRT needing a restart, JIRA caches lots of database information when it starts up so changes made directly in the database are often not reflected in JIRA until it is restarted and caches the new data.
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.