You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
i try to change the IssueType Scheme of project with Rest API PUT.
for this i've Project ID and IssueType Scheme ID (or i think it is...)
for getting Project ID :
curl -u USER:PASSWORD -X GET -H "Content-Type: application/json" "https://MYDOMAIN/rest/api/2/project/" | jq '.[]|select(.key | endswith("LAST_CHAR_OF_PROJECT_NAME"))' | jq '.id'
i get "26700". Ok
for getting IssueType Scheme ID :
curl -u USER:PASSWORD -X GET -H "Content-Type: application/json" "https://MYDOMAIN/rest/api/2/issuetypescheme/" | jq '.schemes[]|select(.name | contains("ISSUE_TYPE_SCHEME_NAME"))' | jq '.id'
i get "62600". Ok
Now has it's say in issuetypescheme-project-put
i send this :
curl --user USER:PASSWORD -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' 'https://MYDOMAIN/rest/api/2/issuetypescheme/project' --data '{
"issueTypeSchemeId": "62600",
"projectId": "26700"
}'
and i get this error :
{"errorMessages":["Unrecognized field \"issueTypeSchemeId\" (Class com.atlassian.jira.issue.fields.rest.json.beans.IssueTypeSchemeCreateUpdateBean), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@5554acbf; line: 2, column: 25] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.IssueTypeSchemeCreateUpdateBean[\"issueTypeSchemeId\"])"]}
Please, does anyone has an idea ?
regards.
Hi @antoine-externe_lavaud - Is your project a classic project?
1. Issue type schemes can only be assigned to classic projects.
2. If any issues in the project are assigned issue types not present in the new scheme, the operation will fail. To complete the assignment those issues must be updated to use issue types in the new scheme.
hi @Niranjan
ok, i try to change from IssueType Scheme containing :
Bug, Epic, Pre-Condition, Story, Sub-task Sub-Task, Task, Test, Test Execution, Test Plan, Test Set
to IssueType Scheme containing :
Bug, Enabler, Epic, New Feature, Story, Sub-task Sub-Task, Task
So, yes, Enabler and New Feature are not in the present scheme and some issue type will going to be remove.
Actually i only avec one Bug Issue in this project.
Are you sur that's can't be change... ?
(i think this PUT is really useless if we can't change it that way...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just noticed that you are on JIRA server. I was misled by the doc link that you shared (It was pointing to jira Cloud Doc).
You cannot associate a project with a issuetype scheme in JIRA server.
https://jira.atlassian.com/browse/JRASERVER-59948 - Open feature Request
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice work @Niranjan
I saw the server tags in the post, but didn't check the link that was supplied to see if the correct documentation was being referenced.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @antoine-externe_lavaud
Your PUT request to the /rest/api/2/issuetypescheme/project endpoint looks to be properly formed and the curl code looks correct too, so I don't know why you're seeing that error. It looks like there is some problem parsing the issueTypeSchemeId definition in the JSON of the request body.
I don't have access to Jira Server anymore to test with, but the same PUT request to Jira Cloud using the v3 REST API works perfectly.
Try sending the same PUT request to the same endpoint, but omit the issueTypeSchemeId definition from the request body. Do you get this message back?
"An issue type scheme ID and a project ID have to be provided"
If so, then try using a REST test tool like Postman or similar to test your full PUT request to see if there is some small, hidden mistake somewhere in your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.