I create an IssueType in Java. Now I want to add that IssueType to the current IssueTypeScheme of the project.
But I don’t understand whats happaning there. Isn’t there an easier way?
Thx,
Harald
I create an IssueType in Java. Now I want to add that IssueType to the current IssueTypeScheme of the project.
But I don’t understand whats happaning there. Isn’t there an easier way?
Thx,
Harald
My solution:
for (final Project p : projectManager.getProjects()) {
final FieldConfigScheme scheme = issueTypeSchemeManager.getConfigScheme(p);
if (!scheme.getAssociatedIssueTypes().contains(issueType)) {
final OptionSet options = optionSetManager.getOptionsForConfig(scheme.getOneAndOnlyConfig());
options.addOption(IssueFieldConstants.ISSUE_TYPE, issueType.getId());
issueTypeSchemeManager.update(scheme, options.getOptionIds());
}
}