1
0
-1
1 answer
- 10-1
Solution
If you look at the content being sent in the comment containing attachments - it contains something like
![](https://d3v-francis.zendesk.com/attachments/token/AzEkdy3kmZ8X9MsqzAlG8Aarg/?name=hpalm-jira.png)
By converting it into something like
!https://d3v-francis.zendesk.com/attachments/token/AzEkdy3kmZ8X9MsqzAlG8Aarg/?name=hpalm-jira.png!
Jira will be able to show the inline attachment.
Note that works only if the attaachments is accessible under that token. The day that the token is invalidated, the attachmetnt will not be reachable, so this is not really a solution.Implementation
It is easy to replace the ![](<filename>) into !<filenname>! by using following construct- Line 1 uses the mergeComments to iterate over all the comments in the replica and summons the closure to be run.
- Line 4 calls the replaceAll groovy string method. For each stringsegment matching the regexp a replacement is created. The replacement contains the necessary code to show the image with a maximum width of 512
Code is available here
Add your comment...
Inline attachments are handled differently on ZenDesk.
Anyway - the issue object is not including inline attachments into the issue.attachments array.
How can these be synnchronized.