Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,414,280
Community Members
 
Community Events
170
Community Groups

Issue sync with exalate

I'm trying to sync data between two jira instances. The connection is already established and working fine, but the data change between the instances is not working as expected. So I've tried to first do some investigation and set-up a secondary project (based on the configuration of the first one) in the same instance as the source. I've added some new custom fields and established the local connection. Within the code connection settings, I've added the following code within the outbound connection:

replica.customFields."11800" = issue.customFields."11100"
replica.customFields."11801" = issue.customFields."11200"

Inbound:
issue.customFields."11100".value = replica.customFields."11800"?.value
issue.customFields."11200".value = replica.customFields."11801"?.value

Nevertheless, after triggering the sync, a new issue in the secodary project is created, custom fields are populated as well, with the same values as the source, it's just that the wrong fields are populated in the destination project.
Source custom field values are populated to the same custom fields in the destination project. That means, I have the custom field 11100 in the source, that should be copied into the custom field 11800, but in the destination project, the custom field 11800 has no value, and the custom field 11100 is populated instead.

Is there anything that I'm doing wrong?

Thank you and best regards,
Peter

2 comments

Hello, @Peter Pešta 
I'm Serhiy, part of the Exalate technical team.
In order to help you I'm going to need some more information about your set up:

  1. how do you call the Jiras you're connecting (e.g. Jira A and Jira B?).
  2. given that the id of the custom field that you want to send from Jira A is 11100 , is the custom field id into which you'd like to receive on Jira B 11800 ?
  3. is the given Inbound script set on Jira B "Incoming sync" script?

Regards, Serhiy

Like # people like this

Hi @Serhiy Onyshchenko

1. The use case above is a sync between two projects on the same jira instance (local sync).
2. Yes, ID of the cf_11100 in project A should be synced into cf_11800 of project B.
3. Since it´s a local sync, there´s no Jira B. Only a project B.

Regards,
Peter

Like Mariia Onyshchenko likes this

Hey, @Peter Pešta 

Thanks for the clarification.

In this case your rules should contain the following lines


Outgoing sync:

replica.project = issue.project
if (issue.project.key == "A") {
replica.customFields."11100" = issue.customFields."11100" // exposes the value of custom field in project A to the scripting for project B
replica.customFields."11200" = issue.customFields."11200"
} else {
//// uncomment if you'd like the sync to be bi-directional:
// replica.customFields."11800" = issue.customFields."11800" // exposes the value of custom field in project B to the scripting for project A
// replica.customFields."11801" = issue.customFields."11801"
}

Incoming sync:

if (replica.project.key == "A") {
// sync A -> B
issue.customFields."11800".value = replica.customFields."11100"?.value // sets the value of the custom field 11800 in project B to the value sent from project A's 11100
issue.customFields."11801".value = replica.customFields."11200"?.value
//// note that you could also write
// issue."11800" = replica."11100"
// issue."11801" = replica."11200"
} else {
//// uncomment if you'd like the sync to be bi-directional:
//// sync B -> A
// issue.customFields."11100".value = replica.customFields."11800"?.value
// issue.customFields."11200".value = replica.customFields."11801"?.value
}

note, how in outgoing sync you simply copy values from issue variable to replica variable as-is, and the mapping of which value should go to where only happens in incoming processor.

Please, let me know if this helps.
If you have any more questions, we have a great community where Exalate users discuss scenarios like yours (https://community.exalate.com/). Or just reach out to support@exalate.com. We'll be happy to help!
Regards, Serhiy. 

Like Mariia Onyshchenko likes this

Hello, @Peter Pešta , I hope you're doing fine.

In regards to having field mapping configured visually, Exalate is definitely able to configure these rules without scripting: 


https://drive.google.com/uc?export=download&id=1V7FrMTHe2MeFr-5yCTiv9jBzxJjaHckp

 

Regards, Serhiy.

francis Marketplace Partner Mar 08, 2021

(I'm a colleague of Serhiy, also working for Exalate)

The visual mode announcement video is available at
https://www.youtube.com/watch?v=-CJlH_SDIl8


@Peter Pešta, in case you don't want to be dragged into scripts and maintaining them, you could also check out our app, Backbone Issue Sync for Jira or other issue sync apps if they better meet your needs.

With Backbone, you don't have to deal with customfield ids for setting up the sync, but simply map it via our UI. If you're interested in a demo, you can request one via our webpage.

Cheers,
Matthias.

Like JIRA Pagalba likes this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events