The code snippet included in the javadoc of the PrioritySchemeManager class is missing a getter :
PrioritySchemeManager prioritySchemeManager;
...
FieldConfigScheme fieldConfigScheme = prioritySchemeManager.createWithDefaultMapping("Some name", "Some description", ImmutableList.of("1", "2", "3"));
...
Logically, we get a "java.lang.NullPointerException: Cannot invoke method createWithDefaultMapping() on null object" error.
So how do we get access to an instance of the PrioritySchemeManager ?
The ComponentAccessor that usually gives access to all managers doesn't help for this one.
Thanks,
Eddy
You can use ComponentAccessor, like this:
import com.atlassian.jira.issue.fields.config.manager.PrioritySchemeManager
PrioritySchemeManager prioritySchemeManager = ComponentAccessor.getComponent(PrioritySchemeManager)
Did you ever find a solution for this Fras?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.