JIRA Macro idea:
{{jira style="custom" parameters="display.custom.template=My.JIRATemplate"}}
...
{{/jira}}
in My.JIRATemplate:
Bindings:
- issues --> List<JIRAIssue>
JIRAIssue extends Element
- getFieldValue(fieldName)
- getCustomField(fieldName) --> JIRACustomField
JIRACustomField extends Element
- getKey()
- getValue()
- getName()
- parameters: JIRAParameters object
- displayers (map) : Map of JIRADisplayer
- fields --> List<String> : fields to display
{{velocity}}
#foreach ($issue in $issues)
#foreach ($field in $fields)
## Specific display for a specific custom field
#set ($customField = $issue.getCustomField($field))
#if ("$!customField" != '' && $customField.getKey().endsWith(":url"))
#set ($renderedValue = "[[Lien>>$customField.getValue()]]"
#else
#set ($renderedValue = $displayers.get($field).displayField($field, $issue))
#end
* $renderedValue
#end
#end
{{/velocity}}
Example:
---------
{{jira style="custom" parameters="display.custom.template=My.JIRATemplate"}}
...
{{/jira}}
And in My.JIRATemplate:
{{chart source="inline" ...}}
#foreach ($issue in $issues)
...
#end
{{/chart}}
vs example 2
-------------
Using directly JRJC API...
TODO: try this first!