I am trying to replicate a reponse same as the API "/issue/createmeta" this API's have Project -> Issue Type - > Fields. Under this fields they have metadata regarding the field. I am trying to achieve the same with ComponentAccesor. Is it possible to access those metadata with ComponentAccesor. If yes, Then how can it be achieved?
I am able to get IssueTypes and the Fields associated with the Issue Types.
MutableIssue issuePattern = ComponentAccessor.getComponentOfType(IssueFactory.class).getIssue();
issuePattern.setProjectId(project.getId());
issuePattern.setIssueTypeId(issueType.getId());
IssueCreationHelperBean issueCreationHelperBean = ComponentAccessor.getComponentOfType(IssueCreationHelperBean.class);
List<OrderableField> orderableFields = issueCreationHelperBean.getFieldsForCreate(ComponentAccessor.getJiraAuthenticationContext().getUser(), issuePattern);
JsonArray fields = new JsonArray();
for(OrderableField orderableField : orderableFields) {
JsonObject field = new JsonObject();
field.addProperty("name", orderableField.getName());
field.addProperty("key", orderableField.getNameKey());
fields.add(field);
}