It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Get Owner of Current Dashboard in Jira

Mengna Du Jul 21, 2013

Hi,

I am developing a standalone gadget for JIRA with HTML and JavaScript. In which I wish to use json to get the username of current dashboard via REST API to realize the authorization.

I am figuring out how to get this attribute via REST api but after my looking up for several documentations I could not find it....Is there anyway could realize that function?

Thank you so much!

Mona

1 answer

0 votes
Timothy Chin Community Leader Jul 22, 2013

The gadget itself has an option to OAuth itself to JIRA (https://developer.atlassian.com/display/GADGETS/Using+the+Atlassian+Gadgets+JavaScript+Framework).

<Require feature="oauthpopup" />

Mengna Du Jul 22, 2013

Hi Timothy,

I know the OAuth technology but mine is a standalone one in which I did not use the JIRA framework... Therefore this option does not apply in my case...

Timothy Chin Community Leader Jul 23, 2013

If that's the case, i doubt that you can get the username. You could try to read off the <head> tag. There is a <meta> tag with username.

&lt;meta name="ajs-remote-user" content="xxx"&gt;

Mengna Du Jul 23, 2013

Hi! I have found the attribute you mentioned. But what I need is the dashboard owner which could not be found....

Also, I have found there is corresponding JIRA API in Java to access the dashboard owner name. But I am still figuring out how to integrate plugin in Java and Gadget in Java-Script....Do you have any idea about that?

Here are the reference links:

https://developer.atlassian.com/display/GADGETS/Creating+a+Gadget+JavaScript+Object#CreatingaGadgetJavaScriptObject-View

https://developer.atlassian.com/display/JIRADEV/Plugin+Gadget+Tutorial+-+Writing+a+Gadget+that+Displays+the+Days+Left+in+a+Version

https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/portal/PortalPage.html

Thank you so much!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

1,258 views 2 13
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you