Hello,
I've created a plugin that adds web-section and web-link in top menu:
My company name
|---- Task A
|---- Task B
I would like to create another plugin that will add another web-link, but under the same web-section as previous plugin.
My company name (defined in both plugins)
|---- Task A (first plugin)
|---- Task B (first plugin)
|---- Task C (second plugin)
Is it possible? I've tried defining web-section in both plugins, but all I get is two menus with the same ID.
My code:
First plugin:
<web-section key="section_workflow" name="eR Workflow Main Section" location="er_workflow_links" weight="5"> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-section> <web-item key="er_workflow_links" name="Main Section - header link" section="system.top.navigation.bar" weight="5"> <label>eR</label> <link linkId="er_workflow_links">/plugins/servlet/eR_Workflow</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item> <web-item key="workflow_link" name="Workflow page" section="er_workflow_links/section_workflow" weight="10"> <label>Team Workflow</label> <link linkId="workflow_link">/plugins/servlet/eR_Workflow</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item>
Second plugin:
<web-section key="section_workflow" name="eR Workflow Main Section" location="er_workflow_links" weight="5"> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-section> <web-item key="er_workflow_links" name="Main Section - header link" section="system.top.navigation.bar" weight="5"> <label>eR</label> <link linkId="er_workflow_links">#</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item> <web-item key="workflow_link" name="Workflow page" section="er_workflow_links/section_workflow" weight="10"> <label>FluidWork for Tempo</label> <link linkId="workflow_link">/plugins/servlet/eR_FluidWork</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item>
Community moderators have prevented the ability to post new answers.
Apparently, the best way to do this is to make three plugins:
I'm basing my answer on this video: http://summit.atlassian.com/archives/2012/plugin-dev/plugins-in-your-plugins
Plugin A has to be released with Common plugin. The same with Plugin B.
Also, you should define web-item first, then web-section and then web-items in web-section. It makes more sense that way.
Also, you should define web-item first, then web-section and then web-items in web-section. It makes more sense that way.
Interesting DOC about web-section and web-item placement:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another interesting way to do it:
It's not "customer friendly", but if you are creating plugins for internal usage, it's fast and easy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.