Java – Appends the project ID from the project context to the JIRA web-item url

Appends the project ID from the project context to the JIRA web-item url… here is a solution to the problem.

Appends the project ID from the project context to the JIRA web-item url

I’m working on a JIRA plugin that adds additional configuration to the JIRA project. I’ve added a web project link to the project configuration page that links to the servlet. The problem I’m having is appending the item ID as a query string to the URL. According to Atlassian cloud developer documentation, JIRA supports project.id, project.key context parameters. However, the following code snippet appends my project ID from the pom.xml file instead of the currently selected project.

<web-item>
...
    <link linkId="myproject-config-link">/plugins/servlet/myproject/admin?pid=${project.id}</link>   
    <context>project</context>
</web-item>

I

have two questions: is what I’m trying to do implementable, and are object keys (project.key, issue.key, comment.key, etc.) unique?

Solution

Based on this post , the solution is:

admin/pid=${helper.projectObject.id}&amp; key=${project.key}

Related Problems and Solutions