Getting IssueKey on current issue with webpanel

Hello,

I need to get the current Issue key of the issue that the webpage is currently on so i can then use that to get to make a rest call to get a custom field value later on, So i decided to use the Context parameters to get the current issue key. on my console it will show the current issue but the request gives a 404 and my web panel wont load. When i take out the issueKey my webpanel will load fine, I am not sure how to get this to work your help will be greatly appreciated thank you in advanced. Below is my descriptor code

	{
				"key": "example-issue-right-panel",
				"location": "atl.jira.view.issue.right.context",
				"name": {
					"value": "MyWebPanel"
				},
                "url": "/right-issue/issueKey={issue.key}"
               
            }

this is the 404 i recieve
GET /right-issue/Issue-1?xdm_e=https%3A%2F%2FguestUser.atlassian.net&xdm_c=channel-my-app__example-issue-right-panel&cp=&xdm_deprecated_addon_key_do_not_use=my-app&lic=none&cv=1.501.0 404 12.229 ms - 157

Not sure if that will fix your problem but your URL is kind of broken. You should pass the issue key either as a parameter /right-issue?issueKey={issue.key}&foo=bar or as part of the path /right-issue/{issue.key}?foo=bar.

Hi @jschwien,

If you’re interested in getting the current issue, you’ve got the right context parameter but you’d need to pass it as a query parameter to your router like what @sven.schatter pointed out :slight_smile:

Cheers,
Anne