Unsync SNOW ticket if resolved on Jira

Originally asked by Jorden Van Bogaert on 04 February 2021 (original question)


Hi

I found the following article: https://docs.idalko.com/exalate/display/ED/How+to+unexalate+moved+issues+automatically#Howtounexalatemovedissuesautomatically-Stopthesynciftheissuehasbeenmovedtoanotherproject.1

I’m looking for something similar on SNOW. If Jira’s labels contain ‘misrouted’ as a value, I’d want the incoming processor of service now to stop the sync.

Is this possible?

Thanks in advance!

Kind regards

Jorden


Answer by Serhiy Onyshchenko on 04 February 2021

Hello, Jorden Van Bogaert
What happens if on the SNOW side’s incoming sync script you add this:

if (replica.labels.any { l -> "misrouted".equalsIgnoreCase(l.label) }) { syncHelper.unexalate(new com.exalate.basic.domain.BasicIssueKey(entity.idStr, entity.number ?: entity.idStr, entity.entityName)) }

Regards, Serhiy.


Comments:

Jorden Van Bogaert commented on 08 February 2021

Hi Serhiy

Thanks for the reply! We’ve decided to go a different approach, so I haven’t gotten the SNOW admins to test this one :confused:

The sync should never be broken anymore as it would’ve made our use case that much more complex. Instead we went with the approach of not running the code in the incoming sync if a certain label is added.

Thanks again though!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.