# Invalid issuetype sync from (replica) next-gen to (local) classic project

**URL:** <https://community.exalate.com/t/invalid-issuetype-sync-from-replica-next-gen-to-local-classic-project/4347>\
**Category:** General Questions\
**Tags:** exalate, cloud-jira, migrated\_question, issutype\
**Created:** [November 4, 2024, 6:50am UTC](https://community.exalate.com/t/invalid-issuetype-sync-from-replica-next-gen-to-local-classic-project/4347 "2024-11-04T06:50:07Z")\
**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, 6:50am UTC](https://community.exalate.com/t/invalid-issuetype-sync-from-replica-next-gen-to-local-classic-project/4347/1 "2024-11-04T06:50:07Z")

</div>

_Originally asked by Cloud Chiu on 11 September 2020 [(original question)](https://oldcommunity.exalate.com/questions/11342468)_

* * *

Below is the coding in incoming sync

```auto
if(firstSync){
   issue.projectKey = "XXX"
   // Set type name from source issue, if not found set a default
   issue.typeName = nodeHelper.getIssueType(replica.typeName, (issue.projectKey ?: issue.project.key))?.name ?: "Task"
}
if(issue.typeName == "Epic"){
   issue.customFields."Epic Name"?.value = replica.summary
}

```

I suppose for issue types syncing from replica next gen project do not exist in local classic project, the default issue type is “Task”. In the other sides, I confirm that the task issue type is set in the project’s issue type scheme.

May you tell what’s wrong with my code?

* * *

---

<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/invalid-issuetype-sync-from-replica-next-gen-to-local-classic-project/4347/2 "2024-11-04T06:50:08Z")

</div>

_Answer by André Leroy-Beaulieu Castro on 19 November 2020_

Francis Martens (Exalate) Cloud Chiu

This error has been resolved and documented in the following community question:

[Issue Type Invalid Error - Jira Cloud](https://oldcommunity.exalate.com/questions/20121733/issue-type-invalid-error---jira-cloud-)_(old community)_

Thanks,

André

* * *
