Set dashboard for multiple users via API

Stefano Minella January 1, 2013

Hi,

I created a dashboard and shared it with a group of users.

Now I need to insert this dashboard in the favourite dashboards of all these users.

How can I do it using API, or script? Or also directly via SQL on the database?

Thank you

bye

stefano

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Nic Brough -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.
January 1, 2013

1. SQL requires you to have Jira offline while you run it, so I'd recommend crossing that off your list immediately

2. Groovy scripts and plugins can do this quite readily. I'd use the script runner, and https://answers.atlassian.com/questions/4687/request-working-script-to-favorite-issue-on-behalf-of-all-users

3. Additionally, I'd warn you against doing this a lot. It's ok to give favourite dashboards to new users, but I'd hesitate to push them to existing users. A dashboard is a personal thing and if you mess with something people have set up to suit themselves, it really does annoy them. Imagine you have a desk, it's all yours, you arrange it the way you like it and make it work effectively for you, and then someone comes along and glues a large useless penguin to it right in the middle. Helpful? No. Over-the-top analogy, yes, but you'll be surprised just how much grief you will get if you do this. Keep it rare and make sure your dashboards are of genuine use to the entire group (i.e. ask them properly, don't assume)

Stefano Minella January 2, 2013

Hi,

thank you for your answer, I quite totally agree with you; in my opinion shared dashboards are really usefull in order to let me to control a generic panel where all the users see the same things.

Anyway in addition to this, I agree with you that each user can have also personal dashboard.

Coming back to my question... I read your link but I didn't find some functions to manage dashboard. Do you know which could be the function?

Thank you

Nic Brough -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.
January 2, 2013

The first answer gives you a script (for the script runner) that will set a dashboard as favourite for other users.

Henning Tietgens
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.
January 7, 2013

I think you can use the provided script, but you have to replace all "SearchRequest" texts by "PortalPage".

Henning

JamieA
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.
January 7, 2013

Broadly agree with Nic but used sensibly I think it's fine. I do this a lot. It's a lot easier than telling users to click on a dashboard link then click favourite. After all, it is only adding an additional dashboard, not modifying their existing one.

0 votes
Stefano Minella January 7, 2013

Thank you Henning, it works!

TAGS
AUG Leaders

Atlassian Community Events