Table of Contents
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Send attachment(s) of the source issue to the specific object (another instance), when the object key is known:
Code Block { "aql": "Key = OBJ-1", "sourceKey": "{{issue.key}}" }
Send attachments of the last comment of the source issue to several specific objects (another instance)
When the object keys are initially known:
Code Block { "aql": "Key IN (OBJ-1, OBJ-2, OBJ-3)", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" }
When the object keys objects are recorded selected in the Jira issue Assets field (A10) of the source instance (keys should be separated with commas):
Code Block { "aql": "Key IN ({{issue.AssetFieldA10.key}})", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" }
Send an attachment to a specific object (same or another instance) when the object name is known:
Code Block |
---|
{ "aql": "name = \"Object Name\"", "sourceKey": "{{issue.key}}" } |
Send an attachment to a specific object (same or another instance) when the object label is known:
Code Block |
---|
{ "aql": "label = \"Object Label\"", "sourceKey": "{{issue.key}}" } |
Send an attachment to an object (same or another instance) of the same name that is selected in the Assets field (A10Objects) of on the source instance:
Code Block |
---|
{ "aql": "nameKey inIN (\"{{issue.a10.nameObjects}}\)"", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" } |
Send an attachment to an object (same or another instance) of the same label that is selected in an Assets field (A10Objects) of on the source instance:
Code Block |
---|
{ "aql": "label in (\"{{issue.a10.labelObjects}}\")", "sourceKey": "{{issue.key}}" } |
Send an attachment(s) of the last issue comment to objects of known schema ID (431659) and Object Type ID (58508059), when the object is selected in a field on a source instance (A10Objects). Attachemnt(s) will be sent to the objects with the same name as selected in the Assets field (A10Objects):
Code Block |
---|
{ "aql": "objectSchemaId=431659 and ObjectTypeId=58508059 and label in (\"{{issue.a10.nameObjects}}\")", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" } |
Note |
---|
If several attachments are sent to several objects, depending on the number and size of the attachments, the automation log may return “Response 408 SocketException: Socket closed”. However, this might be a false error and the attachments will be sent to the objects. |
External application
Make a POST request with the generated URL endpoint. To authenticate your API requests, include an Authorization header in each request. The value of this header should be the API token generated from the API Tokens page. The sample request structure:
...