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


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | copyAttachmentById(attachmentId, issueKey) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Copies the attachment for the provided id from one issue to another.

Copies the attachment for the provided id from one issue to another. 

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| attachmentId | Number | Yes | Attachment id. |
| issueKey | String | Yes | Issue key where you want to copy the attachment. |

## Return Type

**Boolean (true/false)**

Returns "true" if the attachment was copied successfully and "false" otherwise. If returned "false" check the log for a detailed reason on why it failed.

## Example

```
copyAttachmentById(10205, "TEST-2");
```

## See also

> Macro (contentbylabel)