Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
separatorpipe
printabletrue

Overview

You can use this action in a workflow trigger to approve a workflow approval. This action completes the approval, even if there are pending assigned reviewer decisions or a reviewer rejection decision.

When the workflow trigger event occurs, the trigger checks that any required conditions are met, and if met, the "approve" action approves a named approval.

Info

One or more trigger actions can be set for a named event in the workflow.

"approve"

Excerpt

The trigger action "approve"sets an approved decision for a named approval if the provided parameters are valid.

  • action (approve

    • approval Name of the Approval to be approved. If not specified, the default approval is used

    • user❗️ Atlassian userID of the approver


❗️ Mandatory parameter

user

The trigger trigger action must define a value for the user parameter for the approve action to take place.


† Default approval

If no approval name is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition.

Ifthe state hasmultiple approvals, the default approval is the first approval listed in the state's JSON markup.


Example trigger code

Code Block
"triggers":
[
	{"event": "on-change-state",
	"conditions":
	[
		{"final":true}
	],
	"actions":
	[
		{"action": "approve",
			"approval": "Sign-off",
			"user":"5d52a37ef0f22a0da2d6f070"}
	]}
]
Info

 If adding the JSON trigger using workflow builder visual editor, there is no need to include the opening "triggers": JSON markup notation; it is added automatically by workflow builder.

The Atlassian user Identification Number (userId) is visible in the URL when viewing the User Profile.

image-20241009-184333.png

o