Web item condition is not working

navya k September 17, 2019

I'm trying to add "IsAdminCondition", but my web-item is not visible for "admin" users.

<web-item name="Button" i18n-name-key="button.name" key="Button" section="system.top.navigation.bar" weight="1000">
<description key="button.description">Button</description>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.IsAdminCondition"/>
<label key="Button"/>
<styleClass>call</styleClass>
<link linkId="button-link"></link>
</web-item>

 

image.png

 

3 answers

1 accepted

2 votes
Answer accepted
navya k September 19, 2019

@Tuncay Senturk & @Andrew Thanks for your response.

It worked after importing "com.atlassian.jira.plugin.webfragment.conditions" in pom.xml and executing "atlas-clean".

 

<Import-Package>com.atlassian.jira.plugin.webfragment.conditions, org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
0 votes
Andrew
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.
September 17, 2019

Hi @navya k ,

Could You please try with different 

weight="1000"

E.g. 0, 10, 100... I have case when item showing only with specific weight.

B.R.

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 17, 2019

Hello @navya k 

Is there anything wrong in the application logs? As far as I see your condition is OK and I believe it should work.

Anyway, alternatively try below condition

com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition

and if that does not work either, please see the logs, there should be something which will give us clue.

Tuncay Senturk

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events