# Map Sprint field of One Jira with Custom field of Another Jira

**URL:** <https://community.exalate.com/t/map-sprint-field-of-one-jira-with-custom-field-of-another-jira/4587>\
**Category:** General Questions\
**Tags:** onpremise-jira, jira-cloud, feature-customfield, migrated\_question, mappig\
**Created:** [November 4, 2024, 7:08am UTC](https://community.exalate.com/t/map-sprint-field-of-one-jira-with-custom-field-of-another-jira/4587 "2024-11-04T07:08:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:08am UTC](https://community.exalate.com/t/map-sprint-field-of-one-jira-with-custom-field-of-another-jira/4587/1 "2024-11-04T07:08:14Z")

</div>

_Originally asked by Madhu on 03 February 2021 [(original question)](https://oldcommunity.exalate.com/questions/25067595)_

* * *

Can we map Sprint field of One Jira with Custom field of Another Jira. I have tried this in Visual Mode but unfortunately it is not possible.

I have tried writing the following 2 different scripts still I was not able to Map those fields.

1. “MyJIRA.issue.systemFields.“Sprint”.1 = RemoteJIRA.issue.customFields.“SIT Sprint”.SIT0”
2. “MyJIRA.issue.“Sprint”.1 = RemoteJIRA.issue.customFields.“SIT Sprint”.SIT0”

Is there any possibility to meet my requirement. Thanks in Advance.

Madhu

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:08am UTC](https://community.exalate.com/t/map-sprint-field-of-one-jira-with-custom-field-of-another-jira/4587/2 "2024-11-04T07:08:15Z")

</div>

_Answer by André Leroy-Beaulieu Castro on 04 February 2021_

Hi Madhu,

If you want to synchronize the RemoteJira’s custom field value into the Sprint field in MyJira, this line would do it:

```auto
MyJira.issue.customFields.Sprint?.value = RemoteJira.issue.customFields."SIT Sprint"?.value

```

If you want it the other way around, that the RemoteJira’s customField is populated with the value of MyJira’s Sprint field, then it would be:

```auto
RemoteJira.issue.customFields."SIT Sprint"?.value = MyJira.issue.customFields.Sprint?.value

```

I know the “Sprint” is a system field, but in the Exalate logic we store that field in the custom Fields so the lines above should work.

Let me know if this answers your questions.

Thanks,

André

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:08am UTC](https://community.exalate.com/t/map-sprint-field-of-one-jira-with-custom-field-of-another-jira/4587/3 "2024-11-04T07:08:16Z")

</div>

_Answer by Mariia Horbatiuk on 16 February 2021_

Hi Madhu,

To map the following use-case:

Field One --\> “Dev Sprint” with values 1 , 2 , 3 , 4 .  
Field two --\> “Test Sprint” with values Test1, Test2, Test3, Test4.

1 = Test1  
2 = Test2  
3 = Test3  
4 = Test4

Please try the sync rules below.

Incoming sync on the side which has Dev Sprint:

```auto
def testSprintToDevSprint =
["Test1":"1","Test2":"2","Test3":"3","Test4":"4"]
def devSprint = testSprintToDevSprint.find {k, _ -> 
k.equalsIgnoreCase(replica.customFields."Test Sprint"?.value?.value)}
if (devSprint) {
issue.customFields."Dev Sprint".value = devSprint
}

```

Incoming sync on the side which has TestSprint

```auto
def devSprintToTestSprint =
["1":"Test1","2":"Test2","3":"Test3","4":"Test4"]
def testSprint = devSprintToTestSprint.find {k, _ -> 
k.equalsIgnoreCase(replica.customFields."Dev Sprint"?.value?.value)}
if (testSprint) {
issue.customFields."Test Sprint".value = testSprint
}

```

Hope this helps.

* * *
