Class: Workflowscheme

Workflowscheme

new Workflowscheme()

Workflowscheme

Properties:
Name Type Description
connector IConnector

the jira connector instance

Source:

Methods

createDraftForParent(options, callbackopt) → {Promise.<any>}

Create a draft for the passed scheme. The draft will be a copy of the state of the parent.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

createScheme(options, callbackopt) → {Promise.<any>}

Create a new workflow scheme.

The body contains a representation of the new scheme. Values not passed are assumed to be set to their defaults.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

name string

name

description string

description

defaultWorkflow string

defaultWorkflow

issueTypeMappings string

issueTypeMappings

originalDefaultWorkflow string

originalDefaultWorkflow

originalIssueTypeMappings string

originalIssueTypeMappings

draft string

draft

lastModifiedUser string

lastModifiedUser

lastModified string

lastModified

updateDraftIfNeeded string

updateDraftIfNeeded

issueTypes string

issueTypes

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteDefault(options, callbackopt) → {Promise.<any>}

Remove the default workflow from the passed workflow scheme.when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project).

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

updateDraftIfNeeded string

updateDraftIfNeeded when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project).

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteDraftById(options, callbackopt) → {Promise.<any>}

Delete the passed draft workflow scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteDraftDefault(options, callbackopt) → {Promise.<any>}

Remove the default workflow from the passed draft workflow scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteDraftIssueType(options, callbackopt) → {Promise.<any>}

Remove the specified issue type mapping from the draft scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteDraftWorkflowMapping(options, callbackopt) → {Promise.<any>}

Delete the passed workflow from the draft workflow scheme.the name of the workflow to delete.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the name of the workflow to delete.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteIssueType(options, callbackopt) → {Promise.<any>}

Remove the specified issue type mapping from the scheme.when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project).

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

updateDraftIfNeeded string

updateDraftIfNeeded when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project).

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteScheme(options, callbackopt) → {Promise.<any>}

Delete the passed workflow scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

deleteWorkflowMapping(options, callbackopt) → {Promise.<any>}

Delete the passed workflow from the workflow scheme.the name of the workflow to delete.flag to indicate if a draft should be created if necessary to delete the workflow from the scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the name of the workflow to delete.

updateDraftIfNeeded string

updateDraftIfNeeded flag to indicate if a draft should be created if necessary to delete the workflow from the scheme.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getById(options, callbackopt) → {Promise.<any>}

Returns the requested workflow scheme to the caller.Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

returnDraftIfExists string

returnDraftIfExists Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getDefault(options, callbackopt) → {Promise.<any>}

Return the default workflow from the passed workflow scheme.Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

returnDraftIfExists string

returnDraftIfExists Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getDraftById(options, callbackopt) → {Promise.<any>}

Returns the requested draft workflow scheme to the caller.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getDraftDefault(options, callbackopt) → {Promise.<any>}

Return the default workflow from the passed draft workflow scheme to the caller.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getDraftIssueType(options, callbackopt) → {Promise.<any>}

Returns the issue type mapping for the passed draft workflow scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getDraftWorkflow(options, callbackopt) → {Promise.<any>}

Returns the draft workflow mappings or requested mapping to the caller.the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getIssueType(options, callbackopt) → {Promise.<any>}

Returns the issue type mapping for the passed workflow scheme.Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

returnDraftIfExists string

returnDraftIfExists Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

getWorkflow(options, callbackopt) → {Promise.<any>}

Returns the workflow mappings or requested mapping to the caller for the passed scheme.the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.

returnDraftIfExists string

returnDraftIfExists Default: falsewhen true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

setDraftIssueType(options, callbackopt) → {Promise.<any>}

Set the issue type mapping for the passed draft scheme.

The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

workflow string

workflow

updateDraftIfNeeded string

updateDraftIfNeeded

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

setIssueType(options, callbackopt) → {Promise.<any>}

Set the issue type mapping for the passed scheme.

The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

issueType string

issueType

workflow string

workflow

updateDraftIfNeeded string

updateDraftIfNeeded

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

update(options, callbackopt) → {Promise.<any>}

Update the passed workflow scheme.

The body of the request is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field.

The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created and/or updated when the actual scheme cannot be edited (e.g. when the scheme is being used by a project). Values not appearing the body will not be touched.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

name string

name

description string

description

defaultWorkflow string

defaultWorkflow

issueTypeMappings string

issueTypeMappings

originalDefaultWorkflow string

originalDefaultWorkflow

originalIssueTypeMappings string

originalIssueTypeMappings

draft string

draft

lastModifiedUser string

lastModifiedUser

lastModified string

lastModified

updateDraftIfNeeded string

updateDraftIfNeeded

issueTypes string

issueTypes

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

updateDefault(options, callbackopt) → {Promise.<any>}

Set the default workflow for the passed workflow scheme.

The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflow string

workflow

updateDraftIfNeeded string

updateDraftIfNeeded

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

updateDraft(options, callbackopt) → {Promise.<any>}

Update a draft workflow scheme. The draft will created if necessary.

The body is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

name string

name

description string

description

defaultWorkflow string

defaultWorkflow

issueTypeMappings string

issueTypeMappings

originalDefaultWorkflow string

originalDefaultWorkflow

originalIssueTypeMappings string

originalIssueTypeMappings

draft string

draft

lastModifiedUser string

lastModifiedUser

lastModified string

lastModified

updateDraftIfNeeded string

updateDraftIfNeeded

issueTypes string

issueTypes

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

updateDraftDefault(options, callbackopt) → {Promise.<any>}

Set the default workflow for the passed draft workflow scheme.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflow string

workflow

updateDraftIfNeeded string

updateDraftIfNeeded

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

updateDraftWorkflowMapping(options, callbackopt) → {Promise.<any>}

Update the draft scheme to include the passed mapping.

The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field.the name of the workflow mapping to update.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the name of the workflow mapping to update.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>

updateWorkflowMapping(options, callbackopt) → {Promise.<any>}

Update the scheme to include the passed mapping.

The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field.

The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.the name of the workflow mapping to update.

Parameters:
Name Type Attributes Description
options Object

An object containing options to pass to the Jira API.

Properties
Name Type Description
id string

id

workflowName string

workflowName the name of the workflow mapping to update.

token string

token The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

callback <optional>

if supplied, called with result of api call

Source:
Returns:

result of api call

Type
Promise.<any>