How to show Servlet in Project Administration Panel?

Tomasz Kustrzynski March 26, 2015

I'd like to show servlet in the project administration area, just like Hip Chat does for example - web item in the left navigation area points to  /plugins/servlet/hipchat/notifications/PROJECT_KEY which displays config as below:

Screen Shot 2015-03-26 at 22.33.36.png

I have implemented all other project configuration areas, and the plugin itself is a <project-tabpanel>, so it shows properly in the Project Overview panel.

I ran out of ideas by now, as I don't see any suitable decorator that would show project related context on the servlet generated page (there's good piece about decorators at j-tricks, but it only applies to general administration, not project configuration). 

Are there any good practices how to implement plugins that require project administration?

Perhaps servlet is not the best way anyway?

Thanks

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
Daniel Wester
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.
March 26, 2015

You're close. This is what I'm using for one of our add ons:

&lt;meta name="decorator" content="atl.admin"/&gt;
		&lt;meta name="admin.active.section" content="atl.jira.proj.config"/&gt;
		&lt;meta name="admin.active.tab" content="wittified-simplified-admin"/&gt;
		&lt;meta name="project" content="$textutils.htmlEncode($action.projectKey)"/&gt;
		&lt;meta name="projectKey" content="$textutils.htmlEncode($action.projectKey)"/&gt;
		&lt;meta name="ajs-projectKey" content="$textutils.htmlEncode($action.projectKey)"/&gt;

Where wittified-simplified-admin is related to:

&lt;web-item key="wittified-simplified-admin" section="atl.jira.proj.config/projectgroup1" weight="10" name="Simplified Administration"&gt;
        &lt;label&gt;Simplified Administration&lt;/label&gt;
        &lt;link linkId="wittified-simplified-admin-link"&gt;
            /secure/wittifiedSimplifiedProjectConfig!default.jspa?pid=${helper.projectObject.id}&amp;amp;projectKey=$projectKeyEncoded
        &lt;/link&gt;
        &lt;description&gt;Links up simplified administation for a project&lt;/description&gt;
    &lt;/web-item&gt;
Tomasz Kustrzynski March 26, 2015

Thank you. That's what I was looking for, however I cannot get the active tab to highlight in the menu. I tried your setup (with a different link value in <web-item>) and it simply wouldn't highlight. I tried this as well: <meta name="admin.active.section" content="atl.jira.proj.config/projectgroup1"/> Does section menu item get highlighted for you? It's as if these metas don't have any effect for me: <meta name="admin.active.section" content="atl.jira.proj.config"/> <meta name="admin.active.tab" content="wittified-simplified-admin"/> Cheers,

TAGS
AUG Leaders

Atlassian Community Events