Project sidebar and atl.general decorator

I’ve got an add-on that creates a new item under the project sidebar Add-ons section:

which takes the user to a page with a number of links for the add-on. But when I click on those links I get the resulting page rendered without the sidebar shown in the image. I am using in my .vm file

<meta name="decorator" content="atl.general"/>

because this is not a project admin page. If I change this to

<meta name="decorator" content="admin"/>
<meta name="projectKey" content="$project.key"/>
<meta name="projectId" content="$project.id"/>
<meta name="admin.active.tab" content="$linkId"/>
<meta name="admin.active.section" content="atl.jira.proj.config/projectgroup3"/>

then I get to see my page surrounded by the project configuration menu (Project Settings)

Does anyone have a working .vm file example of showing the project sidebar along with some other HTML content?

Hmm. https://developer.atlassian.com/jiradev/jira-platform/guides/projects/design-guide-jira-project-centric-view/development-guide-jira-project-centric-view seems to suggest that the pre-7.0 way of doing this will not work anymore?

I suspect that you are correct: the pre-7.0 way of doing things won’t work in JIRA 7.x+. We have two versions of our product: one for JIRA 6.x and one for JIRA 7.x, and the latter has a project-centric view (web panel) in place of the project tab panel. That’s not the only reason for the two product versions, by the way. The move to the project-centric view is a pretty small change. We use the same .vm file for both versions.

What you want, though, is more complicated, since you have a second-level menu to display; and the eventual target page needs to be decorated with the sidebar. The documentation you linked to has some instructions under “Extending the page content -> Full control of rendering”, which seem relevant to your scenario.

Are you attempting to make the one version of your add-on work in JIRA 6.x and JIRA 7.x?

2 Likes