Hi,
I want to get Issue field controls. For example like: priority, status or type. How would I do that? Any code examples?
Ok. As always, a good answer depends on the question.
Priority (all):
ComponentManager.getComponentInstanceOfType(ConstantsManager.class).getPriorityObjects()
Issue type (all):
ComponentManager.getComponentInstanceOfType(ConstantsManager.class).getAllIssueTypeObjects()
but: issue types depends on the project (actually scheme), so:
ComponentManager.getComponentInstanceOfType(IssueTypeSchemeManager.class).getIssueTypesForProject(project)
Status depends on the workflow. So you need to study a bit how the WF is integrated in Jira.
It's not clear what you want to achieve. If you want to get the data from Jira you can use any of the APIs, REST or SOAP.
I want to get collection of controls that describe issue. For example issue can use customfields, so I can get
ComponentAccessor.getCustomFieldManager().getCustomFieldObjects(issue)
But how I could do that with default set of controls?
These are on the issue:
issue.getPriorityObject()
etc
Yes, but in that way I will get only one control - priority. But as I said I want to get all like: priority, status, type etc
Or you can get issue.getGenericValue() and just iterate through the keys. Sounds like something is a bit wrong in your design though.
Is this what you need ?
Ok, as Jamie Echlin said, the best solution is to use getGenericValue() method. But unfortunatelly the method is deprecated
Of course, if I understand what you are asking. I confess that I still have doubts.
It looks like you're new here. Sign in or register to get started.