Dennis
Dennis

Reputation: 346

Append project id from project context to JIRA web-item url

I am working on a JIRA plugin that adds additional configuration to the JIRA project. I've added a web-item link to the project configuration page that links to a servlet. The problem I am running into is appending the project id as a query string to the URL. According to the Atlassian cloud developer documentation, JIRA supports project.id, project.key context parameters. However, the snippet below 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 am trying to do achievable and are the object keys (project.key, issue.key, comment.key, etc.) unique?

Upvotes: 3

Views: 888

Answers (1)

Dennis
Dennis

Reputation: 346

Based on this post, the solution is:

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

Upvotes: 3

Related Questions