# Issue Type Invalid Error - Jira Cloud

**URL:** <https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453>\
**Category:** General Questions\
**Tags:** exalate, cloud-jira, migrated\_question, bug, issuetype\
**Created:** [November 4, 2024, 6:58am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453 "2024-11-04T06:58:33Z")\
**Posts on this page:** 5\
**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:58am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453/1 "2024-11-04T06:58:33Z")

</div>

_Originally asked by André Leroy-Beaulieu Castro on 12 November 2020 [(original question)](https://oldcommunity.exalate.com/questions/20121733)_

* * *

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/8c383bc6ba6cfd28dd78686dfa2229bdddecb0cb.png)

ERROR: Field The issue type selected is invalid.: issueType

What is the problem here?

Thanks,

* * *

---

<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:58am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453/2 "2024-11-04T06:58:34Z")

</div>

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

Hello,

Another way we have found that fixes this issue is to go to the Project Trash of your Jira and permanently delete the Jira Next-Gen Projects that caused the duplicate issue types in the first place.

With this solution, there is no need to set the issue type by ID as there will be no issue types duplicated anymore.

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, 6:58am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453/3 "2024-11-04T06:58:35Z")

</div>

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

Hi!

This is a common problem we’ve seen lately related to an Atlassian bug, first step is to go to the following API endpoint with your Jira Cloud URL:

```auto
 $JIRA_CLOUD_URL/rest/api/3/issuetype

```

```auto
  

```

Look for the issue type that is giving you problems, you’ll probably find that you have two issue types, this is because the issue type was created for a next-gen project and when this project is deleted the scope of the issue type is deleted but not the issue type itself so you are left with duplicate issue types.

here is the Atlassian bug about this, if you can comment on it and mark yourself as an affected customer maybe we can draw their attention towards fixing this problem:

[https://jira.atlassian.com/browse/JRACLOUD-75176](https://jira.atlassian.com/browse/JRACLOUD-75176)

The workaround to fix this error is to set the issue type by ID instead of by name, so your script will look something like this:

```auto
if (firstSync) {
	issue.projectKey = "TEST"
	issue.typeName = replica.typeName
	def typeNameToIdMap = ["Story":"5","Epic":"6"]
	issue.customKeys.issueTypeId = typeNameToIdMap[replica.typeName] ?: "5"
}

```

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, 6:58am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453/4 "2024-11-04T06:58:36Z")

</div>

_Answer by Richard Vencu on 12 November 2020_

Hi, if this is created by me - it was the next gen project problem we solved in support.

* * *

#### Comments:

> **André Leroy-Beaulieu Castro commented on 12 November 2020**
>
> > Hi Richard,
> 
> Thanks for the feedback! This has been a common problem lately in support so we are creating this question here in the community for others to be able to solve the problem and for us to reference it for future cases where other customers face this same problem _(old community)_
> 
> Best regards,
> 
> 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:59am UTC](https://community.exalate.com/t/issue-type-invalid-error-jira-cloud/4453/5 "2024-11-06T06:59:35Z")

</div>

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