I am customizing the velocity template for Release Notes and have added e.g. assignee and release notes fields to it. That was quite forward and well documented.
But now I need to re-structure the report as well. The structure on the out-of-the box report is grouped per Issue type, but I need to have them grouped per Development Team (which is a custom field in our instance).
To do this I need to have all possible values for this field and loop over them one by one and print out the issues when they match with the current Dev Team. Pretty much in the same way as the out-of-the box report does with Issue Types.
I haven't found out though have to get all possible values of a custom field into the variable $options to be able to do that loop.
Any hints?
Community moderators have prevented the ability to post new answers.
I'm not sure if you can access all the needed managers from the release notes velocity template, but if, then you can get the fieldConfig from the customfield and an issue and use this to get the options from the optionsManager.
In Groovy it looks like this.
fieldConfig = cfTheCustomField.getRelevantConfig(issue) options = optionsManager.getOptions(fieldConfig)
I hope this helps.
Henning
Hi,
I have been trying to use the OptionsManager in the velocity template but we no success. Do you know any easy way to debug these templates? As I am doing it now I update the template and the I have to re-start JIRA to see the result. This feed-back loop is way to long to be efficient.
Do you have any ideas!
Rgrds,
// Svante
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at "Deploying Velocity templates without restarting JIRA" on https://confluence.atlassian.com/display/JIRA/Customising+Email+Content for a faster way to test changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is a blind alley... I looked into the source of the ReleaseNoteManager and you only have these bindings within the releasenotes velocity template:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! Thnx for the tip with the updating velocity templates without JIRA re-start! That will become handy for sure anyway!
I will look into the JIRA Xporter plugin instead for generating the report instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.