# How can I populate a Jira field with the team to assign the ServiceNow tasks to

**URL:** <https://community.exalate.com/t/how-can-i-populate-a-jira-field-with-the-team-to-assign-the-servicenow-tasks-to/4356>\
**Category:** General Questions\
**Tags:** cloud-jira, cloud-servicenow, migrated\_question\
**Created:** [November 4, 2024, 6:50am UTC](https://community.exalate.com/t/how-can-i-populate-a-jira-field-with-the-team-to-assign-the-servicenow-tasks-to/4356 "2024-11-04T06:50:47Z")\
**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, 6:50am UTC](https://community.exalate.com/t/how-can-i-populate-a-jira-field-with-the-team-to-assign-the-servicenow-tasks-to/4356/1 "2024-11-04T06:50:47Z")

</div>

_Originally asked by Jose Lobo on 23 September 2020 [(original question)](https://oldcommunity.exalate.com/questions/11342820)_

* * *

How can I set the assignment\_group on the ServiceNow side versus the assigned\_to?

The idea is to populate a Jira field with the team to assign the ServiceNow tasks to.

* * *

---

<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, 6:50am UTC](https://community.exalate.com/t/how-can-i-populate-a-jira-field-with-the-team-to-assign-the-servicenow-tasks-to/4356/2 "2024-11-04T06:50:48Z")

</div>

_Answer by André Leroy-Beaulieu Castro on 23 September 2020_

Hi!

To populate a custom field in Jira with the assignment\_group of the corresponding ServiceNow entity, in this case an Incident:

**ServiceNow Outgoing Sync:**

```auto
if(incident.assignment_group && incident.assignment_group != "")){
  replica.assignment_group = incident.assignment_group?.displayValue
}

```

**Jira Incoming Sync:**

```auto
//Change "ServiceNow Assignment Group" to the actual name of the Jira custom field you wish to populate with this info.
issue.customFields."ServiceNow Assignment Group"?.value = replica.assignment_group

```

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 6, 2024, 6:51am UTC](https://community.exalate.com/t/how-can-i-populate-a-jira-field-with-the-team-to-assign-the-servicenow-tasks-to/4356/3 "2024-11-06T06:51:30Z")

</div>

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