Skip to end of banner
Go to start of banner

deleteAttachment

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Availability

This routine is available starting with katl-commons 4.0.0.

This routine is available for Jira server and cloud deployment options.

Syntax

deleteAttachment(issueKey, attachmentName)

or

deleteAttachment(attachmentId)

Description

Deletes the attachment for a given id or for a specified issue and file name.


Parameters

Parameter name

Type

Required

Description

issueKey

string

Yes

Issue key.

attachmentNamestringYesAttachment name.
attachmentIdnumberYesAttachment id.

Return type

boolean (true/false)

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

Example


Example 1

deleteAttachment(10104);

Example 2

deleteAttachment("TEST-1", "attachmentToDelete.txt");

If you have multiple attachments on an issue with the same file name, all of them will be deleted.


See also

  • No labels