Package com.atlassian.jira.config
Interface PriorityManager
- All Known Implementing Classes:
DefaultPriorityManager
@PublicApi
public interface PriorityManager
Manager for
Priority
ies- Since:
- v5.0
-
Method Summary
Modifier and TypeMethodDescriptioncreatePriority
(String name, String description, String iconUrl, String color) Create a new priority.void
Edit an existing priority.findPriorities
(String substring, Set<Long> projectIds) Returns priorities whose names start with or fully match given substring.Deprecated.since v7.6.Returns all priorities.getPriority
(String id) Returns a priority.void
Move the resolution down in the order.void
movePriorityUp
(String id) Move the resolution up in the order.void
removePriority
(String id, String newPriorityId) Removes a priority.void
Deprecated.since v7.6.
-
Method Details
-
createPriority
Create a new priority. Newly added priority will be added to default priority scheme.- Parameters:
name
- name of the priority. Cannot be blank or null. Must be unique.description
- description of the priorityiconUrl
- icon url of the prioritycolor
- color for the priority.- Returns:
- the new
Priority
-
editPriority
Edit an existing priority.- Parameters:
priority
- existing priority.name
- name of the prioritydescription
- description of the priorityiconUrl
- icon Url of the prioritycolor
- color of the priority
-
getPriorities
Returns all priorities. Sorted by sequence. The order can be modified by callingmovePriorityDown(String)
ormovePriorityUp(String)
- Returns:
- a List of
Priority
-
removePriority
Removes a priority. When removing the priority it will change the priority of all issues which have the priority that has been deleted to the priority with id specified as the second argument. Priority will be also removed from all priority schemes.- Parameters:
id
- priority id to remove.newPriorityId
- priority to use for all issues which have the priority which has been removed. Cannot be null.
-
getPriority
Returns a priority.- Parameters:
id
- priority id- Returns:
- a
Priority
or null if no priority with the specified id could be found.
-
setDefaultPriority
Deprecated.since v7.6. Use priority schemesPrioritySchemeManager.setDefaultOption(FieldConfig, String)
Sets the default priority.- Parameters:
id
- priority id
-
getDefaultPriority
Deprecated.since v7.6. Use priority schemesPrioritySchemeManager.getDefaultOption(IssueContext)
Returns the default priority.- Returns:
- the default
Priority
or if none configured null.
-
movePriorityUp
Move the resolution up in the order.- Parameters:
id
- id of the resolution.
-
movePriorityDown
Move the resolution down in the order.- Parameters:
id
- id of the resolution.
-
findPriorities
@ExperimentalApi Stream<Priority> findPriorities(@Nonnull String substring, @Nonnull Set<Long> projectIds) Returns priorities whose names start with or fully match given substring.- Parameters:
substring
- the string that priority names will be matched withprojectIds
- the set of project ids to filter priorities
-