Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Developing JIRA plugin with sub web items

Sreedhar PV July 20, 2016

Hi, 

I would like to implement a Menu with the combination of <web-item> and <web-section>. and I am able to add the Menu on Top Nav bar (system.top.navigation.bar) location using below sample code. 

However my requirement is to implement submenu for each Menu Item. Please suggest me to implement Submenu feature using JIRA Plugin development.

Ex: 

  • Menu 1
    1. Menu 11
    2. Menu 12
  1. Menu 2
    1. Menu 21
    2. Menu 22

 

&lt;web-section key="my-links-section" name="My Links Main Section" location="my-links-link" weight="10" /&gt;

 &lt;web-item key="my-links-link"
   name="Links on My Links Main Section"
   section="system.top.navigation.bar"
   weight="47"&gt;
  &lt;label&gt;Menu 1&lt;/label&gt;
  &lt;link linkId="my-links-link"&gt;google.com&lt;/link&gt;
 &lt;/web-item&gt;

 &lt;web-item key="website-link"
   name="Menu 2"
   section="my-links-link/my-links-section"
   weight="10"&gt;
  &lt;label&gt;Website&lt;/label&gt;
  &lt;link linkId="website-link"&gt;google.com&lt;/link&gt;
 &lt;/web-item&gt;

 

 

Thank you in advance.

Sreedhar

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Volodymyr Krupach
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.
July 20, 2016

You need to seection with location pointing to linkId of the top web-item and all submenus should have section pointing to  linkId/secttionKey:

<!-- web item -->
 <web-item key="someKey0" section="system.top.navigation.bar" weight="100">
 <label key="someLabel" />
 <link linkId="someKeyLinkId/>
 </web-item>

 <web-section key="someKey1" location="someKeyLinkIdweight="10">
  <label key="section1Label" /> <!--- If you really need one --->
 </web-section>

 <web-item key="someKey11" section="someKeyLinkId/someKey1
weight="10">
 <label key="menu11" />
 <link>/yourURLPath11</link>
 </web-item>

 <web-item key="someKey12" section="someKeyLinkId/someKey1
weight="10">
 <label key="menu12" />
 <link>/yourURLPath12</link>
 </web-item>

Sreedhar PV July 28, 2016

Thank you Volodymyr - it resolved my issue and I am able to add submenus as suggested. 

TAGS
AUG Leaders

Atlassian Community Events