Hi,
I'm trying to get reference or copy the file attached in a comment of an Issue.
As of now I'm able to get List of Collection<Attachment> from the Issue. Im unable to get reference to which comment that particular file was was attached.
Is there any other way to accomplish this.?
I'm afraid there's no connection between an attachment and a comment.
However I see two potential workarounds:
1) Check the body of each comment for the attachment name
OR
2) Scan issue history for the time when your attachment was added. Then check the creation time of your comments and see if you'll find a match.
1) In body of api response, no longer has the attachment name in it. Seems this is handled in editor differently
2) Scanning through history matching time stamp is not valid approach
2.a) When we paste / upload image it is uploaded to attachments collections first, then if user saves comment few minutes later, the timestamp is completely different
2.b) What if I edit comment and insert image from attachments?
Would appreciate if there is any other solution on this!!
"body":{
"version":1,
"type":"doc",
"content":[
{
"type":"paragraph",
"content":[
{
"type":"text",
"text":"test2"
}
]
},
{
"type":"mediaSingle",
"attrs":{
"layout":"center"
},
"content":[
{
"type":"media",
"attrs":{
"id":"196e3404-817c-4ea7-897f-5df579710287",
"type":"file",
"collection":"jira-25169-comment-23180",
"width":200,
"height":183
}
}
]
},
{
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you found any solution? Also, I tried to trigger an automation rule with "issue field value changed" and selected field "Attachment", so if that attachment is counted as the last I would able to access it with attachment.last smart value. But if you add and attachment with a comment (via customer portal) it does not trigger that rule(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.