Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleAvailability

This routine is available starting with katl-commons 4.0.0.

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

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

deleteAttachment(issueKey, attachmentName)

...

Package

Alias

deleteAttachment(attachmentId)

Pkg Usage

Description

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

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

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

issueKey

...

String

Yes

Issue key.

attachmentName

...

String

Yes

Attachment name.

attachmentId

...

Number

Yes

Attachment id.

Return

...

Type

boolean 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.

...

Examples

Example 1

Code Block
deleteAttachment(10104);

Example 2

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

...

Note

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

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "attachment_routine" and space = currentSpace ( )
labelsattachmentarray_routineroutines