is there any option to add gadget on dashboard using code ?

is there any option to add gadget on dashboard using code ? let say when user install my dashboard plugin at that time i want to add all available gadget with plugin will auto added on dashboard .

 

Thanks,

MK

1 answer

1 votes

Yes, you could create code in your add-on that lists through all dashboards, and adds your gadget, but don't.

It's not a simple loop - your code will need to deal with

  • Dashboard that are full so it can't be added
  • When to run - if it's on installation, you need some way to not do it again if the add-on is upgraded, re-enabled or re-installed

Additionally

  • For a large system with lots of dashboards, your plugin will fail to load as it will run into a timeout
  • Your users will hate you.  Dashboards are designed by humans, and they put the stuff they want on them.  Having someone force something on to their designed dashboards can be intensely annoying (unless it's something that is utterly fantastic for them, which is unlikely)

I would not bother to do this at all.  It's a lot of effort for no gain.  I'd install the add-on and then stick an announcement banner up saying "hey, there's a great new gadget, please try it"

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,739 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot