Reputation: 12337
I am writing a Jira 5 plugin. I have a web action mapped to a velocity template. The action is triggered from a link generated by a web-item. My question is: how can I insert the issue key/id into my template? I tried:
$issue, $issue.id
I tried to extend AbstractIssueSelectAction
but its getIssueObject()
throws exception saying that the issue id/key is not set.
Upvotes: 2
Views: 1008
Reputation: 26
Your link, that invokes the action (for example "SampleAction"), must be like this: http://something.com/app/context/SampleAction.jspa?id=${issue.id} Just like bundled JIRA actions do.
Assuming that you're extending AbstractIssueSelectAction you can simply use ${action.id} in your result pages if you want to re-submit this ID.
Upvotes: 1