Will it be possible to sync linked confluence pages between issues in the same instance?

Originally asked by Jonathan on 16 October 2019 (original question)


I would like to know if it’s possible to sync the confluence pages that have been linked to an issue within projects in the same instance, my use case of exalate is to sync mobile development projects, we manage each platform as a separate project, but it’s hard to keep everybody in the same page without the confluence links.Source: Jira Cloud (old community)


Comments:

Francis Martens (Exalate) commented on 16 October 2019

Hi Jonathan - Thanks for raising your question here.

Just for my understanding

  • You have an issue you would like to synchronize to another project
  • This issue has links to confluence pages
  • The twin issue should have the same links?
Jonathan commented on 16 October 2019

Exactly

Answer by Francis Martens (Exalate) on 12 November 2019

It took some time to get it done

Example on how to use the jira interfaces to sync confluence links

That’s it

Note

  • It will not delete links
  • It can only work on the same tracker

Please give it a try and let me know


Comments:

Jonathan commented on 13 November 2019

I’m using Jira cloud, I believe that it’s not possible to add a script to the cloud version of jira, if it is possible, could you tell me how Francis Martens (Exalate)?

Francis Martens (Exalate) commented on 08 December 2019

Alright Jonathan

The details for Confluence cloud are

To synchronize Confluence Page links and Web Links:

1. Create a custom Field of type “Single line text” for a normal project or “Short text” for next-gen projects.

2. Configure scripts

Outgoing Sync:

replica.customKeys."Remote Issue Links" = nodeHelper.getRemoteIssueLinks(issue)
  

Incoming Sync:

issue.customFields."Remote Issue Links".value = replica.customKeys."Remote Issue Links".collect {it.url }.join(", ")
  
More  details available on the our documentation page   
<https://docs.idalko.com/exalate/x/EADBAg>