Errors while trying to add web-item conditions

Hello everyone!

I’m trying to make a condition for the web item to be hidden if the user is not a particular group.
I’m having errors:
[ERROR][21,1] method does not override or implement a method from a supertype
[ERROR][22,25] abstract methods cannot have a body

Here is my code: (got it from )

package userGroup;
import java.util.Map;
import com.atlassian.jira.plugin.webfragment.model.JiraHelper;
import com.atlassian.jira.plugin.webfragment.conditions.AbstractIssueWebCondition;
import com.atlassian.plugin.PluginParseException;
import com.atlassian.sal.api.user.UserManager;

public class userHasGroup extends AbstractIssueWebCondition{
private String group;
private UserManager userManager;

public userHasGroup(UserManager userManager){
this.userManager = userManager;

public void init(Map params) throws PluginParseException {"group");
public boolean shouldDisplay(UserManager userManager, JiraHelper arg1) {
if(userManager.getRemoteUserKey()!=null &&!=null){
return userManager.isUserInGroup(userManager.getRemoteUserKey(),;
return false;

Can you please help me to understand what am I doing wrong?

Hi Anastasiya,

the method shouldDisplay you are overriding is the wrong one. The super class AbstractIssueWebCondition has an abstract shouldDisplay method which you have to override instead. It has three arguments:

 public abstract boolean shouldDisplay(ApplicationUser user, Issue issue, JiraHelper jiraHelper);

Alternativly you could derive userHasGroup from AbstractWebCondition.