Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

sdk - How to add a "webwork1" action linked to a "project admin tab" in Jira?

I created a web-item and a webwork action. My web-item displays a new tab in the administration section of projects. The link of the tab points to my actions.

The only problem is that my webwork action is displayed completely in another page. I would like my custom project tab to stay highlighted and my webwork action form to be displayed inside my projects "frame".

Here's my atlassian-plugin.xml :

  <web-item name="info - Project Information" i18n-name-key="info-jira-module.name" key="info-jira-module" section="atl.jira.proj.config/projectgroup1" weight="1000">
    <description key="info-jira-module.description">The info Jira Module Plugin</description>
    <label key="info-jira-module.label"/>
    <link linkId="info-jira-module-link">/secure/MyActionClass.jspa?projectId=${project.id}</link>
  </web-item>

  <webwork1 key="info-project-webwork" name="info Project Webwork" i18n-name-key="info-project-webwork.name">
    <description key="info-project-webwork.description">The info Project Webwork Plugin</description>
    <actions>
      <action name="ca.info.jira.jira.webwork.MyActionClass" alias="MyActionClass">
        <view name="success">/templates/templates/info-project-webwork/myactionclass/success.vm</view>
      </action>
    </actions>
  </webwork1>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You need to add a web-section for your web-item:

<!-- A new Plugins section in the Admin menu -->
<web-section key="info-jira-section"
         name="info - Project Information Section"
         location="admin_plugins_menu"
         weight="110">
  <label key="info-jira-section.name"/>
</web-section>

<!-- A item in the Plugins section -->
<web-item name="info - Project Information" i18n-name-key="info-jira-module.name" key="info-jira-module" section="admin_plugins_menu/info-jira-section" weight="10">
    <description key="info-jira-module.description">The info Jira Module Plugin</description>
    <label key="info-jira-module.label"/>
    <link linkId="info-jira-module-link">/secure/MyActionClass.jspa?projectId=${project.id}</link>

And as I recall, all the web-items are servlets. And be sure your project.id is available in your template.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...