Page decorator value for project settings page in JIRA


My plugin adds a new tab under projectgroup4 of project settings page in JIRA. When I click the tab that is newly added, I render a velocity template which should also look like project settings page but with the panel on the right specific to my plugin.

I couldn’t find any decorators other than the standard ones mention here:

Where can I find all available page decorators? If not, I would like to the value for project settings page.

Right now, I have these meta lines in my velocity template:

<meta name="decorator" content="atl.general"/>
        <meta name="" content="atl.jira.proj.config/projectgroup4"/>
        <meta name="" content="my-tab-name"/>

@david.pinn Thought you could help.

@daniel @jobinkk @justin_shapiro Guys can anyone help?

@ibuchanan is it okay to tag people like this for answers?

For JIRA the best source is to look is the source. I’ve tried to programatically extract it but you have to start heading into SiteMesh land and JIRA’s api didn’t expose it at the time. I’ll add it to my list to look at tomorrow.

But that said in JIRA’s source - take a look at jira-project/jira-components/jira-webapp-common/src/main/webapp/WEB-INF/decorator.xml - it will have a lot of the standard decorators that are available. Note the word standard… :frowning: In this case you want a bunch more data supplied.

In this case you want to look in jira-project/jira-components/jira-plugins/jira-project-config-plugin/src/main/resources/global/tab.vm:

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

Where $linkId is the linkId of your web-item.


Hey @daniel

I have tried your solution.

 <meta name="decorator" content="admin"/>
    <meta name="projectKey" content="$project.key"/>
    <meta name="projectId" content="$"/>
    <meta name="" content="atl.jira.proj.config/projectgroup3"/>
    <meta name="" content="link-projects"/>

It looks like this:

I want it to look like this:

I believe this is because the decorator here is given as “admin”. Any suggestions?
And thanks for the tip. I didn’t know we could access JIRA source. I will figure out how to access the code.

What’s your url for the page? One of my tabs I’ve got the web-item with:


The source is available at - it’s available for any account that has bought a commercial license (including the $10 starter license).

1 Like

Its working now. My URL is : “http://localhost:2990/jira/secure/VersionSyncWebworkAction!default.jspa

However, I have the project key and project id hardcoded in the velocity file now and it worked.

But the project side bar is missing. See below pic:

How do I get the missing piece?
Also, I got access to the source code and was trying to make my way through it.

1 Like

It’s a young community, so you’re breaking new ground. :slight_smile: I think you do great honor to those you tag, showing that you value their input.

1 Like

My guess is that that comes in via javascript somehow. In JIRA’s source take a look at jira-project/jira-components/jira-plugins/jira-project-config-plugin/src/main/java/com/atlassian/jira/projectconfig/servlet/ and compare with what you have.

Note: I think you’ll need JIRA 7.3’s source since the couple of JIRA versions I checked before that didn’t have the plugin’s source. :frowning:

Oe… a Version Sync competitor! :wave:
@kaushikveluru If you need any help with getting some grip on the inner workings of Version & Components in JIRA, make sure to ping me. I’ve been working with this since 2012 and there are some pitfalls I might be able to help you avoid!

@remie Thank you Remie. I have been off that project for a while now. Will get back working on it soon. Will reach out to you then.

1 Like

I have exactly the same issue, I figured out that what I was missing is the following meta-tag:

<meta name="projectKey" content="$project.key"/>

However, $project.key cannot be resolved. When I hard code the project key, everything works like a charm.

What do I need to do for $project.key to be properly resolved?

Hi Rens,

I think you’ll need to put the current project into the rendering context. The context provider for your panel might have something like this:

public Map<String, Object> getContextMap(Map<String, Object> context) {
    @Nullable Project project = (Project) context.get("project");
    if (project == null) {
        throw new NullPointerException("Project must not be null");
    Map<String, Object> params = Maps.newHashMap();
    params.putAll(JiraVelocityUtils.getDefaultVelocityParams(context, jiraAuthenticationContext));
    params.put("project", project);
    return createVelocityParams(params);

If you are using IntelliJ IDEA, you might like to include the following line at the top of your Velocity template file; it lets IntelliJ know to expect “project” in the Velocity context, and will enable auto-complete for that variable.

#* @vtlvariable name="project" type="com.atlassian.jira.project.Project" *#

Hi David,

It was a different issue. My class is an extension of ProjectActionSupport. I have to access the project id and key by referencing the selectedProject property:

<meta name="projectId" content="$"/>
<meta name="projectKey" content="$selectedProject.key"/>

Hi @kaushikveluru, I have the exact same issue. The sidebar is not displayed when I click on my plugin’s project settings link. Have you been able to solve this?

I was able to figure this out. You need to set all four of the following meta keys:

<meta name="decorator" content="admin."/>
<meta name="projectKey" content="$projectKey"/> <!-- ensure this is on view context server side via servlet and BrowseContext -->
<meta name="projectId" content="$projectId"/> <!-- ensure this is on view context server side via servlet and BrowseContext -->
<meta name="" content="alt.jira.proj.config"/>

How’d I figure this out? I viewed source in Google Chrome after clicking the Users and roles menu item in the project setting left navigation. You’ll see these meta keys inside the head section.

@daniel offered a working solution but nobody noticed the trap that @kaushikveluru stepped into. I made the same mistake and i just want to make this clear for people reading this in the future.

Have a look at this line:

<meta name="" content="atl.jira.proj.config/projectgroup4"/>

There is a false friend hiding in plane sight: “”. When you wrote this, you probably looked at your web-item, which should look something like this:

<web-item section="atl.jira.proj.config/projectgroup4" ...>

And thought to yourself “” should probably have the same value as the section attribute in your web-item. But that’s wrong! Once you append “/projectconfigX” or whatever your web-section is called to “atl.jira.proj.config” the sidebar won’t render anymore.

It’s quite easy to miss this subtlety and think “my decorators look exactly the same as in @daniel’s solution and it doesn’t work!” when they actually don’t. So i just wanted to make this clear. Only this will work:

<meta name="" content="atl.jira.proj.config"/>

Hi anyone!

Could you help me please to correct my Action? I try to add web-item:

<web-item name="FieldsItem" i18n-name-key="" key="fields-item" section="atl.jira.proj.config/projectgroup3" weight="1000">
    <description key="fields-item.description">The FieldsItem Plugin</description>
    <label key="fields-item.label"></label>
    <link linkId="fields-item-link">/secure/ActionsAction.jspa</link>


        <meta name="decorator" content="atl.admin"/>
        <meta name="projectKey" content="$project.getKey()"/>
        <meta name="projectId" content="$project.getId()"/>
        <meta name="" content="fields-item-link"/>
        <meta name="" content="atl.jira.proj.config"/>
        <div style = "text-align:center; padding: 2px;">
        <img src="$req.contextPath/download/resources/com.atlassian.tutorial.DBFrame:DBFrame-resources/images/picture.gif" alt="Picture">

package com.atlassian.tutorial.jira.webwork;

import com.atlassian.jira.project.Project;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.atlassian.jira.web.action.JiraWebActionSupport;

public class ActionsAction extends JiraWebActionSupport
    private static final Logger log = LoggerFactory.getLogger(ActionsAction.class);
    private Project project;
    public String execute() throws Exception {
        project = getSelectedProjectObject();
        //noinspection deprecation
        request.setAttribute("com.atlassian.jira.projectconfig.util.ServletRequestProjectConfigRequestCache:project", project);
        return super.execute(); //returns SUCCESS

I get picture in jira admin menu, not a project menu

And I want to get a link such as screens:
But I have

resolved it

<meta name="projectKey" content="$selectedProject.key"/>
<meta name="projectId" content="$"/>

Then remains to understand how to make the url correct(( When I try to get access to, I get

How to link web-item with velocity template?