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
@Override
public boolean shouldDisplay(ApplicationUser user, JiraHelper jiraHelper) {
Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
}
I hope it helps
Thanks for replying.
I'm following the same way, but I'm getting null for jiraHelper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you getting null for jiraHelper?
Where are you using this WebCondition? Can you give some details?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.