跳到主要内容

Execute workflow for issue

POST 

/project/issues/:issueID

Execute workflow for issue.

Use this operation to update the issue status. First query the executable workflows by using GET /project/issues/{issueID}?action=executableWorkflow, then pass the selected workflow id to this operation. The general update-issue operation does not update the issue status.

Business validation failures are returned with HTTP 200 and result: FAIL. Check result, errorCode, and errorMsg to determine whether the workflow succeeded. A single related-issue field supports at most 5000 effective related issues. Exceeding this limit rejects the transition with errorCode: LimitExceeded and errorMsg: LimitExceeded relatedTask; the limit and rejection behavior are unchanged. When validation reports multiple business reasons, one stable primary reason is returned: issues are ordered by ID, fields within each issue by field ID, followed by the issue-level reason. Unknown errors, server failures, and hidden plugin errors still return a generic server error.

History​

VersionChanges
v3.14.117, v3.15.26Added in: v3.14.117, v3.15.26

Request​

Path Parameters

    issueID stringrequired

    The issue ID

Query Parameters

    teamID stringrequired

    The team ID

    action stringrequired
    • action: Actions on issue,support executeWorkflow.

Body

required

The issue workflow information to update

    id stringrequired

    Possible values: non-empty and <= 8 characters

    The ID of the specific issue workflow transition to execute, including its configured post functions. When multiple transitions share the same start and end statuses, this ID selects the transition.

    fieldValues

    object[]

    The fieldValues of the issue project.

  • Array [

  • fieldID stringrequired

    Possible values: >= 8 characters

    The ID of fieldValue.

    type integer

    Possible values: >= 1

    The type of fieldValue (required in v6.94.6 and earlier).

    value objectrequired

    The value of fieldValue.

  • ]

  • linkedWikiPages

    object[]

    nullable

    Wiki pages to associate with the issue, supplied as a complete replacement list. Omit this property or set it to null to request no Wiki association update. An empty array explicitly clears all associations. A non-empty array replaces all associations, ordered by ascending position. The server may normalize stored positions; the supplied position values determine order and are not preserved verbatim. Workflow actions, form defaults, and plugins can still modify associations according to their configuration.

  • Array [

  • id stringrequired

    Possible values: >= 8 characters and <= 8 characters

    The Wiki page ID (8 characters after trimming whitespace).

    position int64required

    The non-negative position used to order the Wiki pages.

  • ]

  • resources

    object[]

    Attachment ids to be associated, separated by commas.

  • Array [

  • id string
  • ]

  • comment

    object[]

    The comment of the issue.

  • Array [

  • contentType integerrequired

    Possible values: >= 1

    The contentType of comment.

    text stringrequired

    The text of comment.

  • ]

  • timeEstimated

    object

    The timeEstimated of the issue.

    hours integer

    timeSpent

    object[]

    The timeSpent of the issue.

  • Array [

  • owner stringrequired

    The owner of timeSpent.

    startTime integerrequired

    The startTime of timeSpent.

    hours integerrequired

    The hours of timeSpent.

    description string

    The description of timeSpent.

  • ]

Responses​

Request is successful.

Schema

    result string

    The result of this request.

    errorCode string

    The error code of this request.

    errorMsg string

    Error message for this request.

    errorData object

    Error meta data for this request.

Loading...