1 answer
- 10-1
Assume the source is blue and the target red
From Source to Target - filter the images
In the outgoing sync of the blue, replace the
replica.attachments = issue.attachments
with the following statement
replica.attachments = issue.attachments.findAll { attachment -> attachment.mimetype.startsWith("image/") && issue.description.contains(attachment.filename) }
This will collect all the attachments of type image which are referenced in the issue description into the message sent from source to target
In the incoming sync of the red, ensure the following statement is executed
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
From Target to Source - Disable attachment sync by
In the outgoing sync of the red, remove
replica.attachments = issue.attachments
In the incoming sync of the blue - remove the
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
Let me know
- Samip K Banker
I am looking to do somehting similar to this but just for Description...
https://docs.idalko.com/exalate/display/ED/How+to+filter+attachments+in+local+comments
~Samip
- user-3fd1a
can you elaborate?
do you want the images referenced in the comments or in the description?
- Samip K Banker
From Description (as the summary of the entry suggest). I looked at the documentation and I can only find how to do what I want to do for Comments... I want to see if you have any example to do it for Description.
- user-3fd1a
Did you try the suggestion I made in this answer?
It is exactly that.
- Samip K Banker
Sorry.. I didn't read your feedback proprely yesterday. Thanks. I will try it out.
Add your comment...
We only want to sync images (mentioned in the description) when the sync happens from original to remote how can we achieve that?