Forums

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

Web item condition is not working

navya k
Contributor
September 17, 2019 edited

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
Contributor
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 Champion
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
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events