The problem is that when a comment is added in C1, exalate will add the comment to A1, and this will trigger a sync with connection X and in turn sync that comment to B1 as well, what you could do is the following:
You can create an executor for both your connections, and in the incoming sync of the connection X you can add some logic to ignore comments made by the executor of connection Y and then in the incoming sync of connection Y add logic to ignore comments made by the executor of connection X.
(this is a setup for a local sync, but it also works whenever syncing over multiple instances)
So mayathe approach would be
Create 2 system users - connectionA and connectionB
On the incoming sync of connectionA use following code snippet in the incoming sync to merge the comments coming from the master
\* line 19 \- merge the incoming comments into the existing issue comments, but use a closure to specify how
\* Line 21 \- format the comment such that the real author and issue is visible
\* line 24 \- set the executor to the user 'connectiona'
On the outgoing sync of connectionA use following code to ensure that only the right comments are included in the message
\* Line 20 \- groovy goodness to collect all comments from the issue
\* line 21, 22 \- only include the comments which have been made by user 'connectiona' or by any other user which name doesn't contain 'connection'
Repeat this for connection B (replacing ‘connectiona’ username with ‘connectionb’)
Why does this work?
The settings are ensuring that comments exchanged over connectionA are either the comments made by users, or the ones made by the user ‘connectiona’
Whenever a comment is created in the incoming sync of ‘connectiona’, the author is set to ‘connectiona’
Oh boy
It took me a while to understand how a solution could be implemented, so if you got your head dazzling, be assured - I got the same feeling (old community)
+ I need to complicate a little bit this question (because it’s not complicated enough (old community) )
I have an external connection, in addition to that connection:
Jira service desk cloud ---- Connection Z ---- A1
As we already discussed, Whenever comments are added to B1 or C1, they should only be added to A1.
I don’t want that those comments will be synced into Jira service desk cloud, is the same manipulation should work for this?
Thanks,
Maya
Francis Martens (Exalate) commented on 10 September 2019
Maya - I can provide you access to our test environment, so you can see how it works.
Regarding the complication - no worries - the approach ensures that the comments are only exchanged connectionX and connectionY
maya commented on 15 September 2019
Hi,
Can you please help me to do the same in Attachments?
Thanks,
Maya
Francis Martens (Exalate) commented on 15 September 2019
Is it working for comments?
maya commented on 15 September 2019
For the local sync, it works.
For the external sync, I still work on this (old community)
Francis Martens (Exalate) commented on 15 September 2019
Regarding the attachments - it is similar - but not completely the same, as attachments cannot be impersonated. Instead of the impersonation, you can change the filename on the target side.
On the outgoing sync, ensure that only the attachments which needs to be synced are included in the message