New to Jira-SF Integration through Exalate Syncing and having issues with Product Key Error

Originally asked by Kaleigh Garcia on 15 August 2023 (original question)


Hello! I’m attempting to update the script for our Jira and Salesforce integration through Exalate. I was asked to update the script to include the Epic for our records called ‘Tech Items’ to sync over. However, I’m getting the following error.

Error Detail Message: Project key is not set. You need to set a project key in the Sync Rules for {0} connection.

I’m not sure where to look or how to set the Project Key. My Code is below with */# used for privacy purposes. What am I missing?

Exalate Incoming Sync to Jira:

if (firstSync) {
    issue.projectKey = replica.JiraProjectKey__c
    issue.typeName = "***"
    if (replica.JiraProjectKey__c == "****" || replica.JiraProjectKey__c == "***") {
        // Set default Epic Link 
        issue.parentId = '######'

Answer by Stéphane Thillay on 16 August 2023

Hi Kaleigh,

As far as I understand, you can’t directly assigned a string to the Jira projectKey field. You’ll have to use the nodeHelper: getProject | Exalate Documentation.

On Jira incoming script, I’m using the syntax:

issue.projectKey = nodeHelper.getProject(replica.projectKey)?.key.toString()

Regards,

Stéphane


Comments:

Kaleigh Garcia commented on 16 August 2023

Thank you! I figured it out. I was misunderstanding the error. It was related to a record rather than my code.