Skip to end of banner
Go to start of banner

copyAttachmentOnJSDComment

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 »

Description

Creates a new public comment containing the specified attachment(s). Attachments are identified either by name or using a regex. If comment is absent, a default comment will be used.

Parameters

Return Type

Integer

The id of the comment that was created.

Examples

Example 1

Creates a comment having a single attachment and using the default comment.

return copyAttachmentOnJSDComment("ANY-101", "some_file.txt", "JSDTEST-42", currentUser());

Returns the id of the newly created comment.

Example 2

Creates a comment having multiple attachments (all.png files) and using a custom comment.

return copyAttachmentOnJSDComment("ANY-101", ".*\\.png", "JSDTEST-42", currentUser(), "Here are all the PNGs we found.");

Returns the id of the newly created comment.

See also

  • No labels