---
title: "addIssueToSprint"
canonical: "https://support.appfire.com/space/PSJ/15480736/addIssueToSprint"
format: markdown
---
> Macro (aura-html)


> 📝 The use of this function requires the Power Scripts for Jira add-on be installed and licensed.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | addIssueToSprint(issue key, sprint id) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Adds an issue to a sprint

Adds an issue to a sprint

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| issue key | String | Yes | The issue key |
| sprint id | Number | Yes | The sprint id |

## Return Type

**Boolean**

'True' if the operation succeeded, 'false' otherwise.

## Example

```
boolean result = addIssueToSprint("AGILE-3", 5);
```

> ⚠️ 1. If there is no issue with that issue key, an exception will be raised.
> ⚠️ 2. If there is no sprint with that sprint id, an exception will be raised.
> ⚠️ 3. The user must have enough permissions to perform this action.

## See also

> Macro (contentbylabel)