@PublicApi public interface

SubTaskManager

com.atlassian.jira.config.SubTaskManager
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Manages SubTasks - issues that are "part of" other issues.

Summary

Constants
String SUB_TASK_ISSUE_TYPE_STYLE
String SUB_TASK_LINK_TYPE_INWARD_NAME
String SUB_TASK_LINK_TYPE_NAME
String SUB_TASK_LINK_TYPE_OUTWARD_NAME
String SUB_TASK_LINK_TYPE_STYLE
Public Methods
IssueUpdateBean changeParent(Issue subTask, Issue parentIssue, User currentUser)
Change the parent of the given subtask to the given new parent on behalf of the given user.
IssueUpdateBean changeParent(GenericValue subTask, GenericValue parentIssue, User currentUser)
void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, User remoteUser)
void createSubTaskIssueLink(GenericValue parentIssue, GenericValue subTaskIssue, User remoteUser)
GenericValue createSubTaskIssueType(String name, Long sequence, String description, String iconurl)
This method is deprecated. Use insertSubTaskIssueType(String, Long, String, String) instead. Since v5.0.
void disableSubTasks()
void enableSubTasks()
Collection<Long> getAllSubTaskIssueIds()
GenericValue getParentIssue(GenericValue issue)
This method is deprecated. Use getParentObject() instead. Since v5.0.
Long getParentIssueId(GenericValue issue)
SubTaskBean getSubTaskBean(GenericValue issue, User remoteUser)
SubTaskBean getSubTaskBean(Issue issue, User remoteUser)
Returns the SubTaskBean for the given parent issue in the context of the given user.
List<IssueLink> getSubTaskIssueLinks(Long issueId)
Returns a list of issue links associated with the issue
IssueType getSubTaskIssueType(String id)
Returns the SubTask IssueType with the given ID.
GenericValue getSubTaskIssueTypeById(String id)
This method is deprecated. Use getSubTaskIssueType(String) instead. Since v5.0.
Collection<IssueType> getSubTaskIssueTypeObjects()
Retrieves all the sub-task issue types
Collection<Issue> getSubTaskObjects(Issue issue)
Collection<GenericValue> getSubTasks(GenericValue issue)
This method is deprecated. Use getSubTaskObjects(com.atlassian.jira.issue.Issue) instead.
@Deprecated IssueType insertSubTaskIssueType(String name, Long sequence, String description, String iconurl)
This method is deprecated. Use insertSubTaskIssueType(String, Long, String, Long) since v6.3.
IssueType insertSubTaskIssueType(String name, Long sequence, String description, Long avatarId)
Create new issue type and adds it to default scheme.
boolean isSubTask(GenericValue issue)
boolean isSubTaskIssueType(GenericValue issueType)
boolean isSubTasksEnabled()
boolean issueTypeExistsById(String id)
boolean issueTypeExistsByName(String name)
void moveSubTask(GenericValue issue, Long currentSequence, Long sequence)
This method is deprecated. Use moveSubTask(com.atlassian.jira.issue.Issue, Long, Long) instead. Since v5.0.
void moveSubTask(Issue issue, Long currentSequence, Long sequence)
void moveSubTaskIssueTypeDown(String id)
void moveSubTaskIssueTypeUp(String id)
void removeSubTaskIssueType(String name)
void resetSequences(Issue issue)
void updateSubTaskIssueType(String id, String name, Long sequence, String description, Long avatarId)
Update existing sub-task issue type.
@Deprecated void updateSubTaskIssueType(String id, String name, Long sequence, String description, String iconurl)
This method is deprecated. Use updateSubTaskIssueType(String, String, Long, String, Long) instead. Since v6.3.

Constants

public static final String SUB_TASK_ISSUE_TYPE_STYLE

Constant Value: "jira_subtask"

public static final String SUB_TASK_LINK_TYPE_INWARD_NAME

Constant Value: "jira_subtask_inward"

public static final String SUB_TASK_LINK_TYPE_NAME

Constant Value: "jira_subtask_link"

public static final String SUB_TASK_LINK_TYPE_OUTWARD_NAME

Constant Value: "jira_subtask_outward"

public static final String SUB_TASK_LINK_TYPE_STYLE

Constant Value: "jira_subtask"

Public Methods

public IssueUpdateBean changeParent (Issue subTask, Issue parentIssue, User currentUser)

Change the parent of the given subtask to the given new parent on behalf of the given user.

Parameters
subTask The SubTask
parentIssue The parent Issue
currentUser 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.

public IssueUpdateBean changeParent (GenericValue subTask, GenericValue parentIssue, User currentUser)

This method is deprecated.
Use changeParent(com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

Change the parent of the given subtask to the given new parent on behalf of the given user.

Parameters
subTask The SubTask
parentIssue The parent Issue
currentUser 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.

public void createSubTaskIssueLink (Issue parentIssue, Issue subTaskIssue, User remoteUser)

public void createSubTaskIssueLink (GenericValue parentIssue, GenericValue subTaskIssue, User remoteUser)

This method is deprecated.
Use createSubTaskIssueLink(com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

create SubTask IssueLink

Throws
CreateException
CreateException

public GenericValue createSubTaskIssueType (String name, Long sequence, String description, String iconurl)

This method is deprecated.
Use insertSubTaskIssueType(String, Long, String, String) instead. Since v5.0.

create SubTask IssueType@return

Throws
CreateException
CreateException

public void disableSubTasks ()

public void enableSubTasks ()

public Collection<Long> getAllSubTaskIssueIds ()

public GenericValue getParentIssue (GenericValue issue)

This method is deprecated.
Use getParentObject() instead. Since v5.0.

Get the parent issue from a subtask

Parameters
issue subtask
Returns
  • the parent issue form a subtask

public Long getParentIssueId (GenericValue issue)

public SubTaskBean getSubTaskBean (GenericValue issue, User remoteUser)

This method is deprecated.
Use getSubTaskBean(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

Returns the SubTaskBean for the given parent issue in the context of the given user.

Parameters
issue the Issue
remoteUser the user
Returns
  • the SubTaskBean for the given parent issue in the context of the given user.

public SubTaskBean getSubTaskBean (Issue issue, User remoteUser)

Returns the SubTaskBean for the given parent issue in the context of the given user.

Parameters
issue the Issue
remoteUser the user
Returns
  • the SubTaskBean for the given parent issue in the context of the given user.

public List<IssueLink> getSubTaskIssueLinks (Long issueId)

Returns a list of issue links associated with the issue

Parameters
issueId issue id
Returns
  • a list of issue links

public IssueType getSubTaskIssueType (String id)

Returns the SubTask IssueType with the given ID.

Parameters
id the ID
Returns
  • SubTask IssueType with the given ID.

public GenericValue getSubTaskIssueTypeById (String id)

This method is deprecated.
Use getSubTaskIssueType(String) instead. Since v5.0.

Returns the SubTask IssueType with the given ID.

Parameters
id the ID
Returns
  • SubTask IssueType with the given ID.

public Collection<IssueType> getSubTaskIssueTypeObjects ()

Retrieves all the sub-task issue types

Returns

public Collection<Issue> getSubTaskObjects (Issue issue)

public Collection<GenericValue> getSubTasks (GenericValue issue)

This method is deprecated.
Use getSubTaskObjects(com.atlassian.jira.issue.Issue) instead.

Parameters
issue the issue
Returns
  • subtasks as GenericValues

@Deprecated public IssueType insertSubTaskIssueType (String name, Long sequence, String description, String iconurl)

This method is deprecated.
Use insertSubTaskIssueType(String, Long, String, Long) since v6.3.

Create new issue type and adds it to default scheme.

public IssueType insertSubTaskIssueType (String name, Long sequence, String description, Long avatarId)

Create new issue type and adds it to default scheme.

public boolean isSubTask (GenericValue issue)

public boolean isSubTaskIssueType (GenericValue issueType)

public boolean isSubTasksEnabled ()

public boolean issueTypeExistsById (String id)

public boolean issueTypeExistsByName (String name)

public void moveSubTask (GenericValue issue, Long currentSequence, Long sequence)

This method is deprecated.
Use moveSubTask(com.atlassian.jira.issue.Issue, Long, Long) instead. Since v5.0.

move SubTask

public void moveSubTask (Issue issue, Long currentSequence, Long sequence)

public void moveSubTaskIssueTypeDown (String id)

public void moveSubTaskIssueTypeUp (String id)

public void removeSubTaskIssueType (String name)

public void resetSequences (Issue issue)

public void updateSubTaskIssueType (String id, String name, Long sequence, String description, Long avatarId)

Update existing sub-task issue type.

@Deprecated public void updateSubTaskIssueType (String id, String name, Long sequence, String description, String iconurl)

This method is deprecated.
Use updateSubTaskIssueType(String, String, Long, String, Long) instead. Since v6.3.