Can you help me with getting IssueType object base on its name and not ID as in com.atlassian.jira.config.IssueTypeManager:getIssueType method? I have no idea how to do it. Do i have to get all issue types and then retrive specific type from returned collection?
Community moderators have prevented the ability to post new answers.
try with this code
int issueTypeID = -1; Collection<IssueType> issueTypes = ComponentAccessor.getConstantsManager().getAllIssueTypeObjects(); for (Iterator<IssueType> itr = issueTypes.iterator(); itr.hasNext();) { IssueType tmpIssueType = (IssueType) itr.next(); if ((tmpIssueType.getName()).compareToIgnoreCase("Defect")) { issueTypeID = Integer.parseInt(tmpIssueType.getId()); break; } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.