# I want to map the JIRA Team Field to a Salesforce Case Picklist Field

**URL:** <https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141>\
**Category:** General Questions\
**Created:** [January 21, 2025, 3:58pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141 "2025-01-21T15:58:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [January 21, 2025, 3:58pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/1 "2025-01-21T15:58:57Z")

</div>

I have the fields mapped but am stuck at how to Define the mapping between these fields so it is bi directional. I feel like I need a DEF script and then does it map to the Team Name or the OPTION ID in JIRA ? Screenshots included of the field. TEAM is a default field in JIRA and Team is a custom pick list field in SFDC

 ![Screenshot 2025-01-21 at 8.53.00 AM](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/fea79e662880017ea1810ab45340791e79d50f09.png)  
 ![Screenshot 2025-01-21 at 8.53.15 AM](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/0cd76eed5f3dae5748e4282d34e15e8e90498665.png)

**SFDC Outgoing**  
if(entity.entityType == “Case”) {  
replica.key = entity.Id  
replica.summary = entity.Jira\_Title\_\_c  
replica.description = entity.Jira\_Summary\_\_c  
replica.comments = entity.comments  
replica.attachments = entity.attachments  
replica.Jira\_Account\_\_c = entity.Jira\_Account\_\_c  
**replica.Jira\_Pod\_\_c = entity.Jira\_Pod\_\_c**  
}

**SFDC Incoming**  
if(firstSync){  
entity.entityType = “Case”  
}

if(entity.entityType == “Case”){  
entity.comments = commentHelper.mergeComments(entity, replica)  
entity.attachments = attachmentHelper.mergeAttachments(entity, replica)  
entity.Jira\_Eng\_Priority\_\_c = replica.priority?.name  
entity.Jira\_ID\_\_c = replica.key  
entity.Jira\_Status\_\_c =replica.status?.name  
**entity.Jira\_Pod\_\_c = replica.Jira\_Pod\_\_c**  
}

**JIRA Outgoing**  
replica.key = issue.key  
replica.comments = issue.comments  
replica.attachments = issue.attachments  
replica.priority = issue.priority  
replica.status = issue.status  
**replica.“Jira\_Pod\_\_C” = issue.Team**

**JIRA Incoming**  
if (firstSync) {  
issue.projectKey = “ST”  
// Set the same issue type as the source issue. If not found, set a default.  
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: “Content Issue”  
}

issue.summary = replica.summary  
issue.description = nodeHelper.toMarkDownFromHtml(replica.description)  
issue.comments = nodeHelper.toMarkDownComments(commentHelper.mergeComments(issue, replica))  
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)  
issue.customFields.“Client Impacted”.value = nodeHelper.createOption(issue, “Client Impacted”, replica.“Jira\_Account\_\_c”)  
issue.labels += nodeHelper.getLabel(“SFDCTechSupport”)  
**issue.Team = replica.“Jira\_Pod\_\_C”**

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [January 22, 2025, 11:25pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/2 "2025-01-22T23:25:38Z")

</div>

I have the sync working from SFDC \>\>\> JIRA and created a field DEF logic in Incoming Scripts using the Team ID #, however if I change the TEAM in JIRA it does not write back to SFDC here is the **SFDC Incoming with updated script**

def stageMap = [  
“74ec6d9a-4c27-4936-930c-888d06f7ca34” : “Agent Pod”,  
“5b92cdc6-5f1c-4c33-931d-9488b7fb4d71”: “Air Pod”,  
“8c85caf6-3676-4596-865c-87d386a77c5a” : “API Pod”,  
“36b5b727-366f-4c32-af4d-0209013efd99” : “Automation Pod”,  
“f3187463-9455-4360-ae4d-2f9d4e9b6149” : “Back Office Pod”,  
“a8305d2b-6ef2-4697-bb31-daa36ccffdd7” : “Content and Global POS”,  
“ab701780-e892-4701-8a2a-456f1e77f18c” : “Data & Analytics Pod”,  
“41c0de82-fe59-4b55-b081-5eab94276d45” : “Design Pod”,  
“128562c0-5c0c-422d-ac13-ddf611b24fdd” : “FE Infra & Partner Pod”,  
“62ca8d12-bdd4-4562-91cc-80ca11795517” : “Finance Team”,  
“8d1b852b-e2a5-42b3-8a0a-58d44430e646” : “Guest & Event Pod”,  
“3847d294-ee10-4963-b923-9fa3099799db” : “Hotel & Ground Pod”,  
“5a7968b7-909e-421d-95e3-36d6f54db311” : “IGT / TE Support”,  
“9c36ad9d-524b-4eec-961c-eda1b82661ce” : “P&P DevOps + SRE Pod”,  
“86197f74-c7b4-4803-bf6a-2a0f1deb5798” : “PerfEng + Tools Pod”,  
“cf9fa392-db0c-49b6-98d8-68752e685961” : “Platform Pod”,  
“ff55c9ed-1a70-456c-82f1-80c86f6e84c7” : “Profile & Admin Pod”,  
“2290f8c1-d27d-4036-8553-dae0621b57d8” : “QA Pod”,  
“99303ce4-f735-4985-aa15-36b89c25e991” : “Supplier Content Relations Team”,  
“44439d53-7d18-4d76-9932-ca5d09ce2d65” : “Seat 1A”,  
“715b5c36-7786-4cca-b7fd-f2bf8f0d9bd7” : “TMC Pod”,  
“2bc156fc-6a32-4185-ba91-1bcf18fc6bb2” : “Unassigned Pod”,  
]  
entity.Jira\_Pod\_\_c = stageMap[replica.Jira\_Pod\_\_c?.name]

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [February 6, 2025, 6:17pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/3 "2025-02-06T18:17:06Z")

</div>

@Javier or @mathieu  
is there any help I can get here I can see everything in remote replica but still if I change the value in JIRA it does not change in SFDC

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [March 18, 2025, 4:54pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/4 "2025-03-18T16:54:16Z")

</div>

This is still something I have not been able to figure out @mathieu or @Javier

---

<div class="post-metadata">

**Author:** ![Majid](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/majid/32/343_2.png) [@Majid](https://community.exalate.com/u/Majid)\
**Post date:** [March 18, 2025, 5:19pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/5 "2025-03-18T17:19:12Z")

</div>

Ahh so you see everything in the replica. Then it should work really.  
Can you share the relevant part of the remote replica (Accessed from SF please)

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [March 18, 2025, 5:20pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/6 "2025-03-18T17:20:16Z")

</div>

![Screenshot 2025-03-18 at 11.19.34 AM](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/27bf31a5b484e10d7c3e48fc2f7cae5217f58943.png)

That is correct I can See the remote, I have no errors on the sync, but the Picklist value does not change in SFDC @Majid

---

<div class="post-metadata">

**Author:** ![Majid](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/majid/32/343_2.png) [@Majid](https://community.exalate.com/u/Majid)\
**Post date:** [March 18, 2025, 5:25pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/7 "2025-03-18T17:25:43Z")

</div>

I think this is the line to blame:  
`entity.Jira_Pod__c = stageMap[replica.Jira_Pod__c?.name]`

So, if you look at the replica, it is fine and `replica.Jira_Pod__c?.name` is `Air Pod`.  
But in the stageMap there is no `Air Pod` on the left side. You seem to have mapped ids instead of names there (maybe). If that is the case, I would do:  
`entity.Jira_Pod__c = stageMap[replica.Jira_Pod__c?.id]`

OR

change the `stageMap` to have names on the left side instead of ids (probably the best option).

Hope it makes sense!

Thanks  
Majid

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [March 18, 2025, 5:27pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/8 "2025-03-18T17:27:27Z")

</div>

will try both and see which works I thought the left side was Remote (jira team field works off ID) and the right side was Local

---

<div class="post-metadata">

**Author:** ![Jacob\_Kalaj](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/jacob_kalaj/32/411_2.png) [@Jacob\_Kalaj](https://community.exalate.com/u/Jacob_Kalaj)\
**Post date:** [March 18, 2025, 5:35pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/9 "2025-03-18T17:35:48Z")

</div>

@Majid adding the .id has worked ! thank you!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/system/32/3_2.png) [@system](https://community.exalate.com/u/system)\
**Post date:** [March 19, 2025, 5:36pm UTC](https://community.exalate.com/t/i-want-to-map-the-jira-team-field-to-a-salesforce-case-picklist-field/6141/10 "2025-03-19T17:36:48Z")

</div>

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