Hello,
Is there a way to tell Exalate to NOT SYNC based off of the value of a field?
When we set the field to NO we don’t want anything that we are setting, changing, adding to be sync’d at all…even if we set it to YES afterwards. long story short any activity that we do while the custom field is set to NO doesn’t need to be pushed to Side B ever.
For example, if we add an attachment or comment while ‘custom_field’ is set to NO it shouldn’t go to side B. When we set that to Yes is still doesn’t need to go to side B. Only everything after we set it back to YES.
Answer by Francis Martens (Exalate) on 10 March 2021
Hi Dewayne,
It means that you need to enhance your outgoing sync}
First of all - stopping the sync can be done by adding a condition to the outgoing sync
// at the beginning of the outgoing sync
if (issue.customFields."shouldSync" == "False") { // an empty replica, will make exalate ignore the change return}
But then whenever the ‘shouldSync’ is set to true, you still want to ignore changes made while the customfield was false.
The challenge is to identify these changes.
A suggestion is to review the issue.history. Assume following history
History = labels: -> label, description:If not here -> description 3
Of course, attachments and comments are not included in the history. This needs a separate filtering
By inspecting the history, one can find the moments that the customfield has been set to ‘no sync’
If you check the comment object here, it has the created and updated timestamps. Based on that information, one can filter out the appropriate objects