Forums

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

How to show web-item in one case and doesn't show othewise?

Влад Демидик August 7, 2018

I develop jira plugin. Faced this problem: i have bool setting and i need show my web-item when this flag is switched on and doesn't show when turned off.

Mb someone know how to do it?

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Tuncay Senturk
Community Champion
August 7, 2018

Hello,

You need to add a condition into your web-item in atlassian=plugin.xml

<web-item ..
<
condition class="com.mypackage.MyCondition" />
</web-item>

 

Here is the snippet of the condition class

public class MyCondition extends AbstractWebCondition {

@Override
public boolean shouldDisplay(ApplicationUser user, JiraHelper jiraHelper) {
return // true or false according to your bool setting
}
}
Влад Демидик August 8, 2018

Thanks, it works!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events