I am new to jira plugin development, Can anyone please provide me a code for getting all the project specific custom fields in my plugin.
I have tried using this code but it is not working.
Java FIle :
private CustomFieldManager CFM = ComponentAccessor.getCustomFieldManager();
public Map createVelocityParams1(BrowseContext ctx) {
Map params = super.createVelocityParams(ctx);
List<CustomField> customField = CFM.getCustomFieldObjects();
params.put("fields",customField);
return params;
}
Velocity File:
<div class="module">
<div class="mod-content">
<table class="aui">
#foreach( $entry in $fields )
#foreach ($CustomField in $entry)
<tr> $CustomField </tr>
#end
#end
</table>
</div>
</div>