I found this code:
Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
JiraHelper jiraHelper = new JiraHelper(); // doesn't work
This code is in my class which extends AbstractWebCondition.
Hi @navya k
You can't use JiraHelper by creating instance with new JiraHelper().
In order to get the issue in a class that extends AbstractWebCondition, you should override the shouldDisplay method as follows and use jiraHelper this way
@Overridepublic boolean shouldDisplay(ApplicationUser user, JiraHelper jiraHelper) { Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");}
I hope it helps
@Tuncay Senturk _Snapbytes_
Thanks for replying.
I'm following the same way, but I'm getting null for jiraHelper.
Are you getting null for jiraHelper?
Where are you using this WebCondition? Can you give some details?
I have created Web item and added
WebItemIssueCondition extends AbstractWebCondition {public boolean shouldDisplay(ApplicationUser applicationUser, JiraHelper jiraHelper) {Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue"); }}
and getting null for jiraHelper.
It looks like you're new here. Sign in or register to get started.