Hi All,
we'd change the email templates: according to the project key, the users would get different links in the email notification hence we have 2 URLs accessing to JIRA.
The code snippet is the following:
#if( PROJECTKEY == "XY")
[ https://zzz.com/browse/${issue.getKey()}?page=${tabpanel-all}]
#else
[ ${baseurl}/browse/${issue.getKey()}?page=${tabpanel-all} ]
#end
Our problem is that we do not find the correct reference for the PROJECTKEY. We tried with this:
$project.Key() but it did not work.
Could you please help?
Thanks in advance,
Rumi
Try $issue.projectObject.key or $issue.getProjectObject().getKey()
You may refer to this page for details https://developer.atlassian.com/display/JIRADEV/Velocity+Context+for+Email+Templates
Yep, as Boris says looks like you can use $issue.getProjectObject().getKey().
However we use $issue.getProject().name for something similar that we do... but looking at the docs, our way might be deprecated and in need of an upgrade but it works for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.