Fetch Gadget ID

xu zhijian October 11, 2011

Hi all,

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

Thanks.

1 answer

1 vote
Anatoly V Kutyakov September 12, 2016

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
TAGS
AUG Leaders

Atlassian Community Events