Context parameters in Jira Service Desk Portals


How would one go about getting the values of context/query parameters are defined when a customer has opened the Requests page (e.g. parameter: status, or reporter) ?

I have developed a Cloud add-on that needs this info to work properly.

I have tried many things (like context parameters), but nothing seems to work. Referer is not available on the header. AP.Navigator.getLocation() returns an javascript error. AP.getLocation() returns undefined.

Maybe @msamy knows someting?

BR, Jonas

Jira Service Desk context parameters lists servicedesk.requestId, servicedesk.requestTypeId and servicedesk.serviceDeskId.

The request status and reporter are fields you should be able to retrieve from the REST API using the request ID.

thanks for helping epehrson

I’m not on the Request “detail” page. Im on the Requests page, that shows the table of requests. I need to know the url parameters, that the user may have chosen, e.g. by clicking on one of his organizations.

Makes sense?

Oh, okay. Which descriptor module are you using this with?

It sounds like this would probably be a good fit for AP.Navigator.getLocation().

Yes @epehrson , but that returns a javascript error. Something about a contextFunction that is undefined.

Sure, as the documentation states, that JavaScript API method is only available in Confluence. I meant, getLocation() is where this would be added.

It would still be useful for us to know which descriptor module you are using though. Would you mind giving more detail?

getLocation() returns undefined.

I use “serviceDeskPortalHeaders” in my atlassian-connect.json to show the iframe with my content. So it’s rendered above the standard list of requests.

any idea @epehrson ?

No solution or idea @epehrson ?

@jonas, sorry, I didn’t catch the question in your previous message.

But I don’t believe Jira Service Desk provides the feature you are after, so you are best off raising a feature request in our Developer Service Desk.

1 Like