How to get current JIRA 'issue' inside a servlet, plugin development?

moxin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2013

I am developing a plugin for JIRA, I thought if there is any method to get current issue object. As we can get current logged-in user using:

User loggedInUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();

I am currently passing issue-key into the servlet to get the issue, like this:

String issueKey = req.getParameter("issue");
		Issue editissue = ComponentAccessor.getIssueManager().getIssueObject(issueKey);

Is there any method to get current issue?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2013

A servlet doesn't have an issue context. So you will have to pass it as a parameter. What you are doing is just fine.

moxin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

good to know that, Thanks.

TAGS
AUG Leaders

Atlassian Community Events