Package com.atlassian.jira.config
Interface SubTaskManager
- All Known Implementing Classes:
DefaultSubTaskManager
,MockSubTaskManager
@PublicApi
public interface SubTaskManager
Manages SubTasks - issues that are "part of" other issues.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionchangeParent
(Issue subTask, Issue parentIssue, ApplicationUser currentUser) Change the parent of the given subtask to the given new parent on behalf of the given user.void
createSubTaskIssueLink
(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) void
void
Enables sub-tasks on the instance.void
enableSubTasks
(boolean createDefaultIfMissing) Enables sub-tasks on the instance.getParentIssueId
(Issue issue) Returns the parent issue ID of this the given issue.getParentIssueId
(Long issueId) Returns the parent issue ID of this the given issue.getParentIssueId
(org.ofbiz.core.entity.GenericValue issue) Deprecated.getSubTaskBean
(Issue issue, ApplicationUser remoteUser) Returns the SubTaskBean for the given parent issue in the context of the given user.getSubTaskIssueLinks
(Long issueId) Returns a list of issue links associated with the issueReturns the SubTask IssueType with the given ID.Deprecated.UsegetSubTaskIssueType(String)
instead.Retrieves all the sub-task issue typesgetSubTaskObjects
(Issue issue) insertSubTaskIssueType
(String name, Long sequence, String description, Long avatarId) Create new issue type and adds it to default scheme.boolean
Return true if the given issue is a subtask.boolean
boolean
boolean
issueTypeExistsByName
(String name) void
moveSubTask
(Issue issue, Long currentSequence, Long sequence) void
void
void
removeSubTaskIssueType
(String name) void
resetSequences
(Issue issue) void
Update existing sub-task issue type.
-
Field Details
-
SUB_TASK_ISSUE_TYPE_STYLE
- See Also:
-
SUB_TASK_LINK_TYPE_NAME
- See Also:
-
SUB_TASK_LINK_TYPE_STYLE
- See Also:
-
SUB_TASK_LINK_TYPE_INWARD_NAME
- See Also:
-
SUB_TASK_LINK_TYPE_OUTWARD_NAME
- See Also:
-
-
Method Details
-
enableSubTasks
Enables sub-tasks on the instance. If there are no sub-task issue types present, then the default sub-task issue type will be created.- Throws:
CreateException
- if the default sub-task issue type creation failed.
-
enableSubTasks
Enables sub-tasks on the instance.- Parameters:
createDefaultIfMissing
- iftrue
and there are no sub-task issue types present, then the default sub-task issue type will be created.- Throws:
CreateException
- if the default sub-task issue type creation failed.
-
isSubTasksEnabled
boolean isSubTasksEnabled() -
disableSubTasks
void disableSubTasks() -
isSubTask
Return true if the given issue is a subtask.- Parameters:
issue
- the issue- Returns:
- true if the given issue is a subtask.
-
getParentIssueId
Deprecated.UsegetParentIssueId(Issue)
instead. Since v6.4.Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Parameters:
issue
- the issue- Returns:
- the parent issue ID of this the given issue, or null.
-
getParentIssueId
Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Parameters:
issue
- the issue- Returns:
- the parent issue ID of this the given issue, or null.
- See Also:
-
getParentIssueId
Returns the parent issue ID of this the given issue. Will return null if the given issue is not a subtask.- Parameters:
issueId
- the issue ID of the subtask- Returns:
- the parent issue ID of this the given issue, or null.
- See Also:
-
getSubTaskBean
Returns the SubTaskBean for the given parent issue in the context of the given user.- Parameters:
issue
- the IssueremoteUser
- the user- Returns:
- the SubTaskBean for the given parent issue in the context of the given user.
-
moveSubTask
-
resetSequences
-
insertSubTaskIssueType
IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId) throws CreateException Create new issue type and adds it to default scheme.- Throws:
CreateException
- Since:
- v6.3
-
updateSubTaskIssueType
void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId) throws DataAccessException Update existing sub-task issue type.- Throws:
DataAccessException
- Since:
- v6.3
-
removeSubTaskIssueType
- Throws:
RemoveException
-
getSubTaskIssueTypeObjects
Collection<IssueType> getSubTaskIssueTypeObjects()Retrieves all the sub-task issue types- Returns:
- A Collection of all sub-task
IssueType
s. - Since:
- 4.1
-
issueTypeExistsById
-
issueTypeExistsByName
-
moveSubTaskIssueTypeUp
- Throws:
DataAccessException
-
moveSubTaskIssueTypeDown
- Throws:
DataAccessException
-
getSubTaskIssueTypeById
Deprecated.UsegetSubTaskIssueType(String)
instead. Since v5.0.Returns the SubTask IssueType with the given ID.- Parameters:
id
- the ID- Returns:
- SubTask IssueType with the given ID.
-
getSubTaskIssueType
Returns the SubTask IssueType with the given ID.- Parameters:
id
- the ID- Returns:
- SubTask IssueType with the given ID.
-
createSubTaskIssueLink
void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException - Throws:
CreateException
-
getAllSubTaskIssueIds
Collection<Long> getAllSubTaskIssueIds() -
getSubTaskIssueLinks
Returns a list of issue links associated with the issue- Parameters:
issueId
- issue id- Returns:
- a list of issue links
-
getSubTaskObjects
-
changeParent
IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, ApplicationUser currentUser) throws RemoveException, CreateException Change the parent of the given subtask to the given new parent on behalf of the given user.- Parameters:
subTask
- The SubTaskparentIssue
- The parent IssuecurrentUser
- The user- Returns:
- an IssueUpdateBean representing the change action.
- Throws:
RemoveException
- if there's a problem unlinking original parent.CreateException
- if there's a problem linking new parent.
-
getParentIssueId(Issue)
instead.