Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

need to change project's issueType scheme with rest api

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.

2 answers

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...)

Hi @antoine-externe_lavaud ,

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

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.

Like Niranjan likes this

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

183 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you