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
Hi,
I try to create a subtask via REST API 2 on my cloud projects.
While it works well for my Team-Managed projects, I cannot create subtasks for company-managed projects.
Are there any limitations or differences between those two project types?
My payload looks as follows:
{'id': '', 'fields': {'project': {'key': 'CMTP'}, 'summary': 'Test Misc Issue - not to be seen after test', 'description': "if you see this the test didn't clean up properly", 'issuetype': {'name': 'Subtask'}, 'priority': {'id': '3'}, 'parent': {'id': '13191'}}}
Thanks a lot for your help.
Hello @Martin Kropp
Are you getting any sort of error message in response?
My first thought is that the name of the subtask issue type is different in your Company Managed project versus your Team Managed project.
In my Jira Cloud instance the default subtask issue type created in a Team Managed project is named "Subtask". But the default subtask issue type created for use in Company Managed projects is named "Sub-task" (with a hyphen).
Many thanks for the quick response.
OK. I understand the subtaks names differ for server projects (we still have some), and different cloud project types:
server projects: Sub-task
team managed projects: Subtask
company managed projects: Sub-task
What's the best way handle this?
Do I need the retrieve the names of the issue type by their id (which seems to be 10316) for cloud projects, independent of the project type?
I see the url = "https://your-domain.atlassian.net/rest/api/2/issuetype/{id}" is per domain, not per project.
How can I get an issuetype of a project, since subtask names differ per project type?
many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to Trudy's answer...
One way to do that is to get the metadata for the issue types in the specific project, confirming you have the correct id for the subtask type. That is described here for the v3 of Create Issue: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
Kind regards,
Bill
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.