You can use automation in Jira to approve or reject an approval. To do this, please follow the below mentioned steps:
Go to the automation section in Jira and Create a new rule.
Select the appropriate trigger.
Add an appropriate condition (if required)
A sample automation rule will look like:
Add smart value as:
{
"fields": {
"EA4J Auto Approver Custom Field": {
"approveReject": true,
"user": "{{ACCOUNTID}}",
"rule": "ed6b9d2a-d529-4b20-a90c-9f085640b1e8"
}
}
}Here, "approveReject": true means approve; "approveReject": false means reject.
“rule“ should have the ID of the rule which needs to be executed.