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

JIRA - Add dropdown menu item in top navigation

Parag Bhole July 22, 2014

Hi,

I am trying to add a dropdown menu button using atlassian connect framework for ondemand on the similar guidelines given at https://developer.atlassian.com/display/JIRADEV/Adding+Menu+Items+to+JIRAbut using json.

Descriptor json file is as below -

{

	"key": "amoeboids-test",

	"name": "test",

	"description": "Test addon",

	"baseUrl": "${localBaseUrl}",

	"vendor": 

	{

		"name": "Amoeboids Technologies",

		"url": "https://www.amoeboids.com"

	},

	"links": 

	{

		"documentation": "https://www.amoeboids.com/",

		"self": "${localBaseUrl}/atlassian-connect.json"

	},

	"authentication": 

	{

		"type": "jwt"

	},

	"lifecycle": 

	{

		"installed": "/installed",

		"uninstalled": "/uninstalled"

	},

	"scopes": 

	[

		"READ",

		"WRITE"

	],

	"modules": 

	{

		"webSections": 

		[

			{

				"location": "system.top.navigation.bar/main-menu-item",

				"key": "menu-section",

				"name": 

				{

					"value": "Menu Section"

				}

			}

		],

		"generalPages": 

		[

			{

				"url": "/mainmenu",

				"key": "main-menu-item",

				"name": 

				{

					"value": "Main Menu"

				},

				"location": "system.top.navigation.bar"

			},



			{

				"url": "/firstItem",

				"key": "first-item",

				"name": 

				{

					"value": "First Link"

				},

				"location": "system.top.navigation.bar/main-menu-item/menu-section"

			},

			{

				"url": "/secondItem",

				"key": "second-item",

				"name": 

				{

					"value": "Second Link"

				},

				"location": "system.top.navigation.bar/main-menu-item/menu-section"

			}

		]

	}

}

To visualize the requirement please see the image below -

Can some one please suggest solution or point out to any documentation to achieve this?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2014

Hi Parag,

Sorry - we didn't see this as we watch the "atlassian-connect" tag. There are two problems with your descriptor:

1. You cannot use a general page as a container for a menu. You will need to use a web-item for the dashboard header and then general page modules for the links within.

2. The location for the menu items should be main-menu-item/menu-section (leave off the system.top.navigation.bar section)

There is an example here:

https://bitbucket.org/atlassianlabs/atlassian-connect-jira-example/src/e119a1ddb395c24faacaedbda1005cd17bb80cc9/atlassian-connect.json?at=master

Parag Bhole July 28, 2014

Hi Seb,

Thanks for reply. I tried the example you have pointed out, as it is, but it is also not showing dropdown as expected, it shows only main menu button with no dropdown icon and hence other links never visible.

Is it possible the dev version I am testing with have some issue? I am using 6.3-OD-07-013 version (build number 6327) with java 1.7.0_45

Thanks,

Parag

seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2014

Which version of Connect are you running? You'll need 1.1.0-rc3 or later.

Derek Williams July 30, 2014

Thank you Seb! -- worked like a charm.

Parag Bhole July 30, 2014

Thank you Seb, it was version issue, now its working.

There is still an issue that we cant add menu items without webSection name which is mandatory as well as blank value is also not allowed for name's value attribute. So its required to have webSection header even when we dont need it.

If you know any solution for that please let me know or else we can live with this for now.

seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2014

That is possible - please create an issue at http://ecosystem.atlassian.net/browse/ACand we can schedule it!

0 votes
Parag Bhole July 24, 2014

anyone from atlassian team who can guide?

TAGS
AUG Leaders

Atlassian Community Events