Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.

Questions

 
1
0
-1

Hello,


Is there a way to create sync for exalate to show linked issues in Jira cloud from Jira Data Center.
For example 
Jira Cloud issue X is synchronized with Jira Data center issue Y. 
Issue Y have two linked issues A and B in different development projects.

How to show linked issues keys and statuses of  A and B in Jira cloud issue X without creating them in Jira cloud. 
I've tried implementing using - https://docs.idalko.com/exalate/display/ED/How+to+synchronize+issue+links+to+a+custom+field but had no success.

Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      https://docs.idalko.com/exalate/display/ED/How+to+synchronize+issue+links+to+a+custom+field

      This is the way to do it.


      • Collect all information into a custom field or custom key
      • Sync it over
      • Apply it on the cloud side.


      > But had no success

      If you provide details, we can see if we can help

      1. Vygandas

        Hi Francis

        At first i've added code block from documentation to Outgoing sync

        //below section of for link sync and information to other jira
        import com.atlassian.jira.component.ComponentAccessor
        def jIssue = ComponentAccessor
          .getIssueManager()
          .getIssueObject(issue.key)
        def ilm = ComponentAccessor.getIssueLinkManager()
        def linkToMapFn = { ldir ->
          { l ->
            [
              "from": [
                "id": l.sourceObject.id,
                "key": l.sourceObject.key
              ],
              "to": [
                "id": l.destinationObject.id,
                "key": l.destinationObject.key
              ],
              "direction": ldir,
              "linkType": (ldir == "relates to")? l.issueLinkType.outward : l.issueLinkType.inward,
              "style": l.issueLinkType.style
            ]
          }
        }
        replica.customKeys.issueLinks = [
        "out": ilm
          . getOutwardLinks(jIssue.id)
          .collect(linkToMapFn("relates to")),
        "in": ilm
          . getInwardLinks(jIssue.id)
          .collect(linkToMapFn("relates to"))
        ]
        //for inwards and outward added currently used issue links

        In cloud Jira to which synchronizing data added this part in incoming sync 

        // add the links information to the custom field
        issue.customFields."Remote Linked issues".value = replica.issueLinks.toString()
        // below are additioanl fields which collect data but they add exalated issue key and status
        //issue.customFields."Remote Linked Key".value = replica.key
        //issue.customFields."Remote Linked Status".value = replica.status.name

        So at this moment, I have a second option to create a custom field, which would contain linked issue statuses, key and would have automated updates for linked issue changes. 
        Then create new sync for custom fields from Jira DC to Jira cloud


        But I would greatly appreciate it if there could be a way without our developers coding custom field which would have such functionality.

      2. Francis Martens (iDalko)

        Line 2 in your incoming sync is wrong.
        In the outgoing - you are storing the data into replica.customKeys.issueLinks

        In the incoming - you are getting the data from replica.issueLinks - which is also a valid object.

        Please rectify the incoming sync and inspect if the data you get is the data you expect by doing a


        throw new Exception("...")

        As explained in the Debugging Sync scripts on Exalate

      CommentAdd your comment...