This resource represents draft workflow schemes. Use it to manage drafts of workflow schemes.

A workflow scheme maps issue types to workflows. A workflow scheme can be associated with one or more projects, which enables the projects to use the workflow-issue type mappings.

Active workflow schemes (workflow schemes that are used by projects) cannot be edited. Editing an active workflow scheme creates a draft copy of the scheme. The draft workflow scheme can then be edited and published (replacing the active scheme).

See Configuring workflow schemes for more information.

Hierarchy

  • CommonHttpService
    • WorkflowSchemeDraftsService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns WorkflowSchemeDraftsService

Methods

  • Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
      }
      • id: number

        The ID of the active workflow scheme that the draft is created from.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    POST /rest/api/3/workflowscheme/{id}/createdraft @scopes-current manage:jira-configuration @scopes-beta read:group:jira, read:issue-security-level:jira, read:project-role:jira, read:screen:jira, read:status:jira, read:user:jira, read:workflow-scheme:jira, read:workflow:jira, write:workflow-scheme:jira, read:application-role:jira, read:avatar:jira, read:issue-type:jira, read:project-category:jira, read:project:jira

  • Resets the default workflow for a workflow scheme's draft. That is, the default workflow is set to Jira's system workflow (the jira workflow).

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
      }
      • id: number

        The ID of the workflow scheme that the draft belongs to.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    DELETE /rest/api/3/workflowscheme/{id}/draft/default @scopes-current manage:jira-configuration @scopes-beta delete:workflow-scheme:jira, read:application-role:jira, read:avatar:jira, read:group:jira, read:issue-type:jira, read:project-category:jira, read:project:jira, read:user:jira, read:workflow-scheme:jira, read:workflow:jira

  • Deletes the issue type-workflow mapping for an issue type in a workflow scheme's draft.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
          issueType: string;
      }
      • id: number

        The ID of the workflow scheme that the draft belongs to.

      • issueType: string

        The ID of the issue type.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    DELETE /rest/api/3/workflowscheme/{id}/draft/issuetype/{issueType} @scopes-current manage:jira-configuration @scopes-beta delete:workflow-scheme:jira, read:application-role:jira, read:avatar:jira, read:group:jira, read:issue-type:jira, read:project-category:jira, read:project:jira, read:user:jira, read:workflow-scheme:jira, read:workflow:jira

  • Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is modified, then the changes in the draft are copied back to the active workflow scheme. See Configuring workflow schemes for more information. Note that:

    • Only active workflow schemes can have draft workflow schemes.
    • An active workflow scheme can only have one draft workflow scheme.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
      }
      • id: number

        The ID of the active workflow scheme that the draft was created from.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    GET /rest/api/3/workflowscheme/{id}/draft @scopes-current manage:jira-configuration @scopes-beta read:group:jira, read:issue-security-level:jira, read:project-role:jira, read:screen:jira, read:status:jira, read:user:jira, read:workflow-scheme:jira, read:workflow:jira, read:application-role:jira, read:avatar:jira, read:issue-type:jira, read:project-category:jira, read:project:jira

  • Sets the workflow for an issue type in a workflow scheme's draft.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
          issueType: string;
          issueTypeWorkflowMapping: IssueTypeWorkflowMapping;
      }
      • id: number

        The ID of the workflow scheme that the draft belongs to.

      • issueType: string

        The ID of the issue type.

      • issueTypeWorkflowMapping: IssueTypeWorkflowMapping

        The issue type-project mapping.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    PUT /rest/api/3/workflowscheme/{id}/draft/issuetype/{issueType} @scopes-current manage:jira-configuration @scopes-beta write:workflow-scheme:jira, read:workflow-scheme:jira, read:workflow:jira, read:application-role:jira, read:avatar:jira, read:group:jira, read:issue-type:jira, read:project-category:jira, read:project:jira, read:user:jira

  • Sets the default workflow for a workflow scheme's draft.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          defaultWorkflow: DefaultWorkflow;
          id: number;
      }
      • defaultWorkflow: DefaultWorkflow

        The object for the new default workflow.

      • id: number

        The ID of the workflow scheme that the draft belongs to.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    PUT /rest/api/3/workflowscheme/{id}/draft/default @scopes-current manage:jira-configuration @scopes-beta write:workflow-scheme:jira, read:workflow-scheme:jira, read:workflow:jira, read:application-role:jira, read:avatar:jira, read:group:jira, read:issue-type:jira, read:project-category:jira, read:project:jira, read:user:jira

  • Sets the issue types for a workflow in a workflow scheme's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
          issueTypesWorkflowMapping: IssueTypesWorkflowMapping;
          workflowName: string;
      }
      • id: number

        The ID of the workflow scheme that the draft belongs to.

      • issueTypesWorkflowMapping: IssueTypesWorkflowMapping
      • workflowName: string

        The name of the workflow.

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "jira",
    "description": "The description of the example workflow scheme.",
    "draft": false,
    "id": 101010,
    "issueTypeMappings": {
    "10000": "scrum workflow",
    "10001": "builds workflow"
    },
    "name": "Example workflow scheme",
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
    }

    PUT /rest/api/3/workflowscheme/{id}/draft/workflow @scopes-current manage:jira-configuration @scopes-beta write:workflow-scheme:jira, read:workflow-scheme:jira, read:workflow:jira, read:application-role:jira, read:avatar:jira, read:group:jira, read:issue-type:jira, read:project-category:jira, read:project:jira, read:user:jira

  • Updates a draft workflow scheme. If a draft workflow scheme does not exist for the active workflow scheme, then a draft is created. Note that an active workflow scheme can only have one draft workflow scheme.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          id: number;
          workflowScheme: WorkflowScheme;
      }
      • id: number

        The ID of the active workflow scheme that the draft was created from.

      • workflowScheme: WorkflowScheme

    Returns Promise<WorkflowScheme>

    Returned if the request is successful.

    example:

    {
    "defaultWorkflow": "scrum workflow",
    "description": "The description of the example workflow scheme.",
    "draft": true,
    "id": 17218781,
    "issueTypeMappings": {
    "10000": "jira",
    "10001": "jira"
    },
    "lastModified": "Today 6:38 PM",
    "lastModifiedUser": {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": true,
    "applicationRoles": {
    "items": [],
    "size": 1
    },
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "emailAddress": "mia@example.com",
    "groups": {
    "items": [],
    "size": 3
    },
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "timeZone": "Australia/Sydney"
    },
    "name": "Example workflow scheme",
    "originalDefaultWorkflow": "jira",
    "originalIssueTypeMappings": {
    "10001": "builds workflow"
    },
    "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"
    }

    PUT /rest/api/3/workflowscheme/{id}/draft @scopes-current manage:jira-configuration @scopes-beta read:group:jira, read:issue-security-level:jira, read:project-role:jira, read:screen:jira, read:status:jira, read:user:jira, read:workflow-scheme:jira, read:workflow:jira, write:workflow-scheme:jira, read:application-role:jira, read:avatar:jira, read:issue-type:jira, read:project-category:jira, read:project:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void