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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 Ginevrie 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 Ginevrie 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.

@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.

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

761 views 12 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you