Originally asked by André Leroy-Beaulieu Castro on 12 November 2020 (original question)
ERROR: Field The issue type selected is invalid.: issueType
What is the problem here?
Thanks,
Originally asked by André Leroy-Beaulieu Castro on 12 November 2020 (original question)
ERROR: Field The issue type selected is invalid.: issueType
What is the problem here?
Thanks,
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é
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:
$JIRA_CLOUD_URL/rest/api/3/issuetype
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
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:
if (firstSync) {
issue.projectKey = "TEST"
issue.typeName = replica.typeName
def typeNameToIdMap = ["Story":"5","Epic":"6"]
issue.customKeys.issueTypeId = typeNameToIdMap[replica.typeName] ?: "5"
}
Thanks,
André
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.
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é
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.