Javadoc
This method needs to be called before creating a project to ensure all parameters are correct. There are a
number of required parameters, such as a project name, key and lead. The validation will also check if a project
with the name or key provided already exists and throw an appropriate error. The project key will be validated
that it matches the allowed key pattern, and it is not a reserved word. A validation error will also be added if no
user exists for the lead username provided.
Optional validation will be done for the url, assigneetype and avatarId parameters. The url needs to be a valid
URL and the assigneeType needs to be either
com.atlassian.jira.project.AssigneeTypes#PROJECT_LEAD,
com.atlassian.jira.project.AssigneeTypes#UNASSIGNED, or null to let JIRA decide on the best default
assignee. UNASSIGNED will also only be valid, if unassigned issues are enabled in the General Configuration.
All the projects created in JIRA must have a project type, and its value must correspond to one of the project types defined on the JIRA
instance. A validation error will be reported if the passed value is null or if it does not meet the previous criteria.
There are two ways to provide the project type to this method: directly via
ProjectCreationData#getProjectTypeKey() or
indirectly via
ProjectCreatedData#getProjectTemplateKey().
If a project template key is provided, this method will look up the project template and use the template's project type as
the type of the created project.
If both a project type and a template key are provided on the received
ProjectCreationData, the project type defined
on the template with the given key will be the one used to create the project.
Providing a template key is the preferred method for creating a project since templates ensure projects are created in a more
useful way for a particular use case.
The method will return a
com.atlassian.jira.bc.project.ProjectService.CreateProjectValidationResult which
contains an ErrorCollection with any potential errors and all the project's details.