Hello to all,
I am having a problem where I have no idea where to find a solution or what to search for, so I'm asking this Question. A little context ahead:
I'm writing a plugin that shows some additional information on the ViewIssueScreen. Placing it right on the standard viewing screen for issues (like eg. structure plugin etc.). I use some velocity and JavaScript to postprocess and display some informations. To do that I'm using my own REST Resource which requires the issueID to work with. I could also use the issueKey, but at this point this doesn't change anything or help.
So I found this https://community.atlassian.com/t5/Answers-Developer-Questions/Read-current-issue-id-with-javascript/qaq-p/481560 to get to the issueID (or key) with
var issueID = JIRA.Issue.getIssueId();
var issueKey = AJS.$("meta[name='ajs-issue-key']").attr("content");
This all works fine up until this:
When I go to the project of the issue, where all issues that belong to it are listed on the left, and the issue clicked is displayed in a screen right side next to it, it can't retrieve the id or key anymore. It just gives back null and undefined.
How can I get the issueID or issueKey within the ViewIssueScreen where it doesn't matter if its a subpage or not?