---
title: "approveIssue (Power Scripts)"
canonical: "https://support.appfire.com/space/PSJ/3190947993/approveIssue%20(Power%20Scripts)"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | approveIssue(issue, [approverUsername]) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Approves an issue in Jira Service Management.

This routine automatically approves all pending approvals for the specified issue on behalf of the specified user or current user if not specified.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| issue | String | Yes | Key of the selected issue |
| approverUsername | String | No | The username of the user on whose behalf the issue is being approved. If not specified, the current user is used. |

## Return Type

**Boolean**

Returns true if the operation was successful, false otherwise.

## Examples

### Example 1

Approve using current user

```
return approveIssue("SM-123");
```

### Example 2

Approve on behalf of a specific user

```
return approveIssue("SM-123", "john.doe");
```



## See also

> Macro (contentbylabel)