The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to hide web-item menu based upon condition in Jira Plugin

Jyoti Kumari
Contributor
March 21, 2023

Hello Everyone,

 

I need to modify plugin in which one menu ,which is present in project settings needs to be show only when key value does not match.I wanted to hide Component Testers menu, if projectKey=demo.Kindly guide me, how to achieve this by modifying atlassian-plugin.xml file .

component.tester.nav.label=Component Testers

Please find content of atlassian plugin.xml file below-

Please find web item and webwork details below-

<web-item key="component_tester_project_config_web_item" name="Project Config Item" section="atl.jira.proj.config/projectgroup3" weight="50">
<label key="component.tester.nav.label"/>
<link linkId="component_tester_project_config_link">/secure/ComponentTesterConfig.jspa?projectKey=$projectKeyEncoded</link>
<condition class="com.atlassian.jira.plugin.webfragment.conditions.CanAdministerProjectCondition"/>
</web-item>

Webwork:-

<webwork1 key="project-config-page" class="java.lang.Object">
<actions>
<action name="org.jboss.labs.jira.plugin.cdw.gui.ComponentTesterAction" alias="ComponentTesterConfig">
<view name="success">/templates/component-tester-admin.vm</view>
<view name="permissionviolation">/templates/component-tester-admin.vm</view>
</action>
</actions>
</webwork1>

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
January 19, 2024

Hi @Jyoti Kumari

Were you able to find a solution for this?

Thank you and Kind regards,
Ram

TAGS
AUG Leaders

Atlassian Community Events