getDefaultIssueType

    Signature

    Helper nodeHelper
    Signature

    There are multiple signature variations:

    • getDefaultIssueType(String projectKey)
    • getDefaultIssueType(IHubProject project)
    Description

    Returns an issuetype which is marked as default for a project.
    Returns null in case the projectKey is not found.
    In case the project has no default issue type, a null is returned.

    Introduced in 0.8

    Example use

    issue.issueType = nodeHelper.getDefaultIssueType("DEMO")
    if (issue.issueType == null) {
        issue.issueType = nodeHelper.getIssueType("Request")
    }  

    Comments

    • getDefaultIssueType is to be used if the type of the to be created issue depends on the project where it has to be created.