Hi,
In my plugin I want to add following conditions on web-item:
I'm doing the following but the plugin doesnt work.
Although I got these conditions from the API, but they seem to be erroneous.
<web-item name="My Links" i18n-name-key="my-links.name" key="my-links" section="system.top.navigation.bar" weight="1000"> <description key="my-links.description">The Links Plugin</description> <label key="my-links.label"></label> <link linkId="my-links-link">https://www.google.com</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition"/> </web-item>
Can you tell me how to do this?
Community moderators have prevented the ability to post new answers.
Hi Muhammad,
It looks like UserLoggedInCondition is part of jira-core and not jira-api.
Try adding JIRA core in your pom see below.
<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency>
Regards
Nelson
Yes, that worked. Thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muhammad,
You need to wrap the conditions into the conditions tag with type AND:
<conditions type="AND"> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition"/> </conditions>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No still not working :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.