Jira menu plugin

Chad Larkin December 4, 2012

I have built a jira meu plugin with multiple sections. However, after the plugin is installed there is only a separator between the first and second section. There is no separator between the second and third sections. Is there a away to make the separator show up for grouping the menu items effectively?

Also, is there a way to make links in the menu open in a new tab in stead of openning in the same tab?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 4, 2012

You're going to need to tell us a lot more about your plugin's layout - what separators are you talking about precisely? Where are things appearing? What classes are you using in your html layout and what does your css say? And so on?

To make links open in a new tab, you can use target="_blank" in your <a href... tag, but bear in mind that isn't always a tab - it can be "new window" and most browsers allow the users to choose - you can't force tab/window

Chad Larkin December 4, 2012

Nic,

Thank you for the quick response. This was built using the example from https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Adding+your+own+Menu+Items+to+JIRA. Here is the section of my atlassian-plugin.xml:

&lt;!--ZD Main Menu Item --&gt;
	&lt;web-item key="zd_links_link" name="Link on ZD Links Main Section" section="system.top.navigation.bar" weight="47"&gt;
		&lt;label&gt;ZD Links&lt;/label&gt;
		&lt;link linkId="zd_links_link"&gt;http://my.jira.loc&lt;/link&gt;
	&lt;/web-item&gt;
	
	&lt;!-- ZD Menu Sections --&gt;
	&lt;web-section key="zd_links_section" name="ZD Links Main Section" location="zd_links_link" weight="10"/&gt;
	&lt;web-section key="tb_section" name="ZD Links TB Section" location="zd_links_link" weight="20"/&gt;
 	&lt;web-section key="b2b_section" name="ZD Links B2B Section" location="zd_links_link" weight="30"/&gt;

	&lt;!-- ZD link Section --&gt;
	&lt;web-item key="confluence_link" name="ZD Confluence" section="zd_links_link/zd_links_section" weight="10"&gt;
        &lt;label&gt;ZD Confluence&lt;/label&gt;
        &lt;link linkId="confluence_link"&gt;http://my.confluence.loc&lt;/link&gt;
    &lt;/web-item&gt;

	&lt;!-- TB Link Section --&gt;
	&lt;web-item key="tb_config_link" name="TB Config Web Site" section="zd_links_link/tb_section" weight="10"&gt;
        &lt;label&gt;TB Config&lt;/label&gt;
        &lt;link linkId="tb_config_link"&gt;http://my.conf.loc/&lt;/link&gt;
    &lt;/web-item&gt;
	&lt;web-item key="tb_reports_link" name="TB Reports Web Site" section="zd_links_link/tb_section" weight="20"&gt;
        &lt;label&gt;TB Reports&lt;/label&gt;
        &lt;link linkId="tb_reports_link"&gt;http://my.reports.loc/&lt;/link&gt;
    &lt;/web-item&gt;
	
	&lt;!-- B2B link Section --&gt;
	&lt;web-item key="yard_link" name="Yard Web Site" section="zd_links_link/b2b_section" weight="10"&gt;
        &lt;label&gt;The Yard&lt;/label&gt;
        &lt;link linkId="yard_link" target="_blank"&gt;https://my.yard.loc&lt;/link&gt;
    &lt;/web-item&gt;
	&lt;web-item key="configurator_link" name="Configurator Web Site" section="zd_links_link/b2b_section" weight="20"&gt;
        &lt;label&gt;Configurator&lt;/label&gt;
        &lt;link linkId="configurator_link" target="_blank"&gt;http://my.configurator.loc/&lt;/link&gt;
    &lt;/web-item&gt;

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 4, 2012

Ok, adding stuff via the atlassian plugin simplifies it, as you're relying on Jira's internal layouts.

But I don't understand what the problem with the separators is?

Chad Larkin December 4, 2012

What is occurring is that there is a section separator line that appears between the ZD link section and the TB link section in the drop down after the plugin has been compiled and deployed. However a separator line does not appear between the TB link section and the B2B link section.

Our management has asked for a separator line between each section. I can't figure how to force that separator line to appear. From reading the development guides, it appeared that creating sections would result in the separator lines but it did not work as I understood it.

Addtionally they asked for the links to open in a new tab/browser for the B2B section. But, adding the value target='_blank' to the link in the xml did not produce that result either.

So I was hoping that I would find someone that had already figured these two items out so I could give our management what they want.

Thanks,

Chad

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events