Originally asked by Jacob Pines on 24 March 2022 (original question)
Hi,
A while ago we requested assistance with updating a Custom field with the value of the Remote Key.
The solution we were given was to add this to Incoming script:
issue.customFields."RemoteCallID"?.value = replica.key
(RemoteCallID is the name of the Custom Field)
We did this on 1 Connection and it’s working as expected.
We tried this on another Connection (to same remote location but different Project) but it’s not working there for some reason.
In this second Project, the Custom Field exists in the Edit and View screens - no need on Create, since on this connection calls are created and updated from our Local location only.
I tried using the Field ID but same result.
I also confirmed we are getting the Key field value from Remote location via the “Entity Sync Status”.
There are no errors in Sync, so have no idea why it’s not working for this project.
Would appreciate some assistance.
Let me know if you need more info.
Comments:
Ariel Aguilar commented on 26 March 2022
Hi there,
We know Exalate might be challenging sometimes, however we want to make sure we can help. We might want to check some details to get to the root of the problem. First, what platform are you using Exalate on? (Jira Server, Jira cloud, ServiceNow, Azure DevOps for example)?
Also, to have a better understanding on the custom field in conflict, what type is it?
Kind regards,
Ariel
Jacob Pines commented on 27 March 2022
We are using Jira Cloud.
Field is type - Text Field (single line)
As I mentioned, we have 2 connections to same Remote location, for 2 different Projects, and this setting works fine on 1 Connection only.
Ariel Aguilar commented on 28 March 2022
It sounds there is a permission problem somewhere, you may check the following articles:
https://docs.idalko.com/exalate/x/WABNB
https://docs.idalko.com/exalate/x/JYEAAg
Let me know if you find something.
Kind regards,
Ariel
Jacob Pines commented on 28 March 2022
Regarding errors, there are none.
I will check regarding the “View” screen.
However wanted to check something I neglected to mention and may also be relevant - both locations (local and remote) are Cloud, but while the Project where this works is “Service project”, the one where this does not work is “Software project”.
Let me know if that changes everything about this (old community)
Jacob Pines commented on 29 March 2022
Field does exist in the View screen.
Any other ideas?
Ziad Qadora commented on 30 March 2022
Hello,
We have implemented this as follow on both side of the sync
if(firstSync){
syncHelper.syncBackAfterProcessing()
}
issue.customFields.“Remote Issue Key”.value = replica.key.toString()
Regards,
Ziad
Jacob Pines commented on 04 April 2022
I added the code you sent to what we have right now on Incoming:
if(firstSync){
issue.projectKey = "LIVE"
issue.typeName = nodeHelper.getIssueType(replica.typeName)?.name ?: "Incident"
syncHelper.syncBackAfterProcessing()
}
issue.customFields."Remote Issue Key".value = replica.key.toString()
I then updated (comment) on a call that is already Synced.
It did not resolve the issue.
I also replaced “Remote Issue Key” with the field name as we have it here and also did not work.
If we want to Sync only on our end, do I still need this added on Remote location?
Just a reminder that we have this working on a different connection (different project), and I used same code from there on this connection and it did not.
Any ideas?
Ziad Qadora commented on 05 April 2022
Is the remote instance also syncing back after processing? Please make sure it is syncing back
Jacob Pines commented on 06 April 2022
They do not.
But the other connection we have with them has Sync to the same field and it works fine, and that one also does not have the Sync Back code.
That is why I have no idea why it’s not working on the 2nd Connection.
If I had errors in Sync, such as Field or Exalate User permission, then that would be something. But I see nothing.