Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current Issue in a webpanel plugin

Jorge Jerez
Contributor
February 8, 2019

Hello,

 

I'm developing a plugin wich contains a Web panel in the Issue view.

I need to show some data from issue fields in my panel, but actually can't.

 

JiraHelper jiraHelper = new JiraHelper();
Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
summary = currentIssue.getSummary();

Actually i'm using this code, but is not working.

 

Anyone know how can i fix it? 

1 answer

1 accepted

1 vote
Answer accepted
Aleksandr Zuevich
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.
February 8, 2019 edited

Hi Jorge,

Usually you don't need to create JiraHelper by yourself. I think in that case you have empty context params at all. I extend my context provider from AbstractJiraContextProvider and override public Map<String, Object> getContextMap(ApplicationUser applicationUser, JiraHelper jiraHelper) method. So you are provided JiraHelper. You just need to use it. 

Jorge Jerez
Contributor
February 25, 2019

Finally was that. 

I didn't see I had a Context provider get on my web panel, when I just use it it worked without any problems, thanks anyway!

Suggest an answer

Log in or Sign up to answer