public class

IssueTypeImportHelper

extends Object
java.lang.Object
   ↳ com.atlassian.jira.imports.project.util.IssueTypeImportHelper

Class Overview

Contains shared functions around issue types required for project import.

Summary

Public Constructors
IssueTypeImportHelper(ConstantsManager constantsManager, ProjectManager projectManager, IssueTypeSchemeManager issueTypeSchemeManager)
Public Methods
IssueType getIssueTypeForName(String name)
Returns the IssueType, in the current system, with the given name.
boolean isIssueTypeValidForProject(String projectKey, String newIssueTypeId)
Checks the projects issue type scheme to determine if the issue type identified by newIssueTypeId is contained in the projects scheme.
boolean isMappingValid(IssueType newIssueType, String projectKey, boolean oldIssueTypeIsSubTask)
Checks to see that the issue type is valid for the provided project key and that its subtask-ness matches the old issue type.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IssueTypeImportHelper (ConstantsManager constantsManager, ProjectManager projectManager, IssueTypeSchemeManager issueTypeSchemeManager)

Public Methods

public IssueType getIssueTypeForName (String name)

Returns the IssueType, in the current system, with the given name. If no Issue Type exists with this name, then returns null.

Parameters
name name of the IssueType.
Returns
  • the IssueType in the current system with the given name.

public boolean isIssueTypeValidForProject (String projectKey, String newIssueTypeId)

Checks the projects issue type scheme to determine if the issue type identified by newIssueTypeId is contained in the projects scheme.

Parameters
projectKey identifies the project
newIssueTypeId identifies the issue type to check
Returns
  • true if the issue type is a part of the projects issue type scheme, false otherwise.

public boolean isMappingValid (IssueType newIssueType, String projectKey, boolean oldIssueTypeIsSubTask)

Checks to see that the issue type is valid for the provided project key and that its subtask-ness matches the old issue type.

Parameters
newIssueType the issueType to be inspected, should not be null
projectKey the project key to see if the issue type is relevant for that project
oldIssueTypeIsSubTask true if the old issue type was a subtask issue type, false otherwise
Returns
  • true if the newIssueType passes the validation, false otherwise