How to sync a subset of issue links?

Originally asked by Jana Küttner on 14 October 2021 (original question)


Hi Support,

I want to synchronize a subset of issue links (filtered by linkTypeName) from a source issue to a dest issue, both in the same Jira instance. The link should always refer to the same issue, e.g.:

A1 is linked to C1, C2, C3

A1 is synced to B1, B1 should be linked to C1, C3 then (C2 could be filtered out by linkTypeName filter)

How can I implement that?

Thanks in advance,

Jana


Comments:

Ariel Aguilar commented on 18 October 2021

Hi Jana,

Exalate supports JQL trigger configuration, you may refer to: https://docs.idalko.com/exalate/x/pAHBAg

Would this work for you?:

issue in linkedIssues("TEST-2", blocks)

The arguments are issue key and linkTypeName.

Kind regards,

Ariel

Answer by Jana Küttner on 19 October 2021

Hi Ariel,

unfortunately, not. We want to copy a subset of issue links from the issue “src” to the issue “dest”.

“src” and “dest” are located in the same Jira instance. The issue links in “src” and “dest” shall refer to the same issue (same issue key).

That’s what we want:

def justTestList = src.issue.issueLinks.findAll(it.value.linkTypeName == “Test”)
dest.issue.issueLinks = justTestList

We also have tried:

dest.issue.issueLinks.add(src.issue.issueLinks[0])

dest.issue.linkedIssues = src.issue.linkedIssues

But all don’t work for us,

Would be great, if you could support.

Thanks in advance,

Jana