Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract the current project in a condition in JIRA project centric view

Pradeep Panayal February 20, 2018

I am having the following web item,

<web-item name="Project Resource Web Item" i18n-name-key="project-resource-web-item" key="project-resource-web-item" section="jira.project.sidebar.plugins.navigation" weight="1000">
<description key="projectresourcewebitem.description">The project resource web item Plugin</description>
<label>Resource</label>
<param name="iconClass" value="aui-icon-large aui-iconfont-user-large"/>
<link linkId="projectresourcewebitem-link">/projects/$pathEncodedProjectKey?selectedItem=com.atlassian.jira.jira-projects-plugin:resource-page&#38;projectKey=$pathEncodedProjectKey</link>
<condition class="x.y.z.ProjectCondition">
<param name="currentProjectKey">${project.key}</param>
</condition>
</web-item>

And my Condition class is,

...

private String jiraProjectKey;
@Override
public void init(Map<String, String> map) throws PluginParseException {
jiraProjectKey = ParameterUtils.getStringParam(map, "currentProjectKey");
}

...

I tried with static value and it works fine. I tried ${project.key},$pathEncodedProjectKey,$helper.project.key. Nothing seems working.

 

How can I get the current project key in condition? 

 

My JIRA version is 7.6.0.

 

 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Thomas Deiler
Community Champion
February 22, 2018

Dear @Pradeep Panayal,

best you ask this question again on the Developer Community.

Thanks for understanding

Thomas