JIRA Single Picklist Custom field to a Salesforce Case Text Field

I’m trying to populate the value from a Jira picklist into a Salesforce text field. While I’m able to successfully send the Jira picklist value to the Salesforce replica, I’m encountering issues when attempting to populate the Salesforce custom field with the desired value.

Incoming Script SalesForce:
entity.Jira_Roadmap_Qtr_c = replica.customFields."Roadmap_Quarter"

Outgoing Script Jira
replica.customFields."Jira_Roadmap_Qtr__c" = issue.customFields."Roadmap Quarter"

The Jira replica shows the details are there but it does not populate the value

 "customFields": {
      "Jira_Roadmap_Qtr_c": {
         "id": 1,
         "name": "Roadmap Quarter",
         "uid": "1",
         "type": "OPTION",
         "value": {
            "id": "10",
            "value": "Q1 2024"
          }
       }
    },

Hello!

The issue you’re encountering with populating the Salesforce custom field is due to the incorrect assignment of the replica object in your incoming script.

In your current script, you’re assigning replica.customFields."Roadmap_Quarter" to entity.Jira_Roadmap_Qtr_c, but it should be replica.customFields."Jira_Roadmap_Qtr__c" instead. This is because "Jira_Roadmap_Qtr__c" is the correct replica field name you used in the outgoing script for the “Roadmap Quarter” custom field in Jira.

To resolve this, the correct script in your Salesforce Incoming sync should be:

entity.Jira_Roadmap_Qtr_c = replica.customFields."Jira_Roadmap_Qtr__c".value.value

This will ensure the value from the Jira picklist is correctly mapped to the Salesforce text field.

Let me know if this solution works for you :slight_smile:

1 Like

Thank you Javier only change that was needed was as is

entity.Jira_Roadmap_Qtr__c = replica.customFields.“Jira_Roadmap_Qtr__c”.value.value

no value is needed after the Entity field

1 Like

I’m glad the script worked for you :grin:
Also, thanks for fixing the script! I have updated the answer

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.