Fetch Gadget ID

Hi all,

Can I get a Gadget ID , or Does some methods support this function?

Thanks.

1 answer

Don't know if this 5 years old question is still actual smile

From within the JIRA gadget (OpenSocial one - i.e. pre 7.x JIRA) you can use this:

var gadget = AJS.Gadget({
...
	view: {
		...
    	template: function (args) {
			...
			var gadgetId = this.getPrefs().getModuleId();
			...
		}
	}
...
});

 

From within the server side consider use DashboardService:

https://developer.atlassian.com/static/javadoc/gadgets/1.0.3/reference/com/atlassian/gadgets/dashboard/DashboardService.html

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Feedback & Announcements

How do you analyze GC logs, thread dumps and head dumps?

Hi awesome community!  In this article, I would like to describe the one of the toolset (service) for the analyze some problems on different Java-based instances, of course, as Atlassian admini...

94 views 0 7
Read article

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