# I can't sync Required Components in Jira Cloud

**URL:** <https://community.exalate.com/t/i-cant-sync-required-components-in-jira-cloud/4677>\
**Category:** General Questions\
**Tags:** migrated\_question, components\
**Created:** [November 4, 2024, 7:15am UTC](https://community.exalate.com/t/i-cant-sync-required-components-in-jira-cloud/4677 "2024-11-04T07:15:50Z")\
**Posts on this page:** 2\
**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:15am UTC](https://community.exalate.com/t/i-cant-sync-required-components-in-jira-cloud/4677/1 "2024-11-04T07:15:50Z")

</div>

_Originally asked by Pablo Fernandez on 16 April 2021 [(original question)](https://oldcommunity.exalate.com/questions/25071436)_

* * *

Hello,

I’m trying to synchronize bugs creation and updates from 2 Jira Cloud domains. However when it’s triggered on one side it’s failing on the other side with the following error in the incoming script: “Cannot set property ‘components’ on null object”

The Component field is the one by default in Jira. However it’s required on both sides. I manually created the component on both sides with exactly the same name but it doesn’t work.

I searched for help in your documentation and tried some scripts but I have the same issue.

Here you have my code:

**Outgoing sync**

```auto
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project
replica.components = issue.components

//Comment these lines out if you are interested in sending the full list of versions and components of the source project.
replica.project.versions = []
//replica.project.components = []

```

**Incoming sync:**

```auto
if(firstSync){
   issue.projectKey = "CES"
   // Set type name from source issue, if not found set a default
   issue.typeName = nodeHelper.getIssueType(replica.typeName)?.name ?: "Bug"
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels
issue.project.components = replica.project.components

//Components
issue.components = replica.components.collect {
    component ->
    nodeHelper.createComponent(
        issue,
        component.name,
        component.description,
        component.leadKey,
        component.assigneeType?.name()
    )
}

```

May you help me please?

Thank you in advance!

Pablo

* * *

---

<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:15am UTC](https://community.exalate.com/t/i-cant-sync-required-components-in-jira-cloud/4677/2 "2024-11-04T07:15:51Z")

</div>

_Answer by Francis Martens (Exalate) on 18 April 2021_

There is no such field

```auto
issue.project.components = replica.project.components

```

Can you take it out and see how the rest of your incoming sync is working

* * *
