How does one create subtasks with the jira-python library ?
The trick is that parent id is not the issue id, but the issue key and subtype has to be 'Sub-task'
For example:
rootnn_dict = { 'project' : { 'key': 'JBIDE' }, 'summary' : 'Test auto created issue', 'description' : 'Ignore this. will be deleted shortly', 'issuetype' : { 'name' : 'Task' }, } rootnn = jira.create_issue(fields=rootnn_dict) print("created " + rootnn.key) rootnn_dict = { 'project' : { 'key': 'JBIDE' }, 'summary' : 'Test child auto created issue', 'description' : 'Ignore this child. will be deleted shortly', 'issuetype' : { 'name' : 'Sub-task' }, 'parent' : { 'id' : rootnn.key}, } child = jira.create_issue(fields=rootnn_dict) print("created child: " + child.key)
Still i am getting error with include all of these... the error is that the issue type and id is not
when i am creating a sub-task this is the error actually encountered me..
""Could not find issue by id or key.""
this is the main error i am getting please resolve it immediately pls waiting for it,... help me somebody.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please replace
'parent' : { 'id' : rootnn.key},
with
'parent' : { 'key' : rootnn.key},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See https://answers.atlassian.com/questions/49433/creating-sub-task-of-an-issue-using-rest-api for the fields to set and then use the regular create_issue() function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured it out. Had a bad delete that was failing covering up the error. i'll post answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried this in many various combinations but no luck.
rootnn_dict = {
'project' : { 'key': 'JBIDE' },
'summary' : 'Test chfild auto created issue',
'description' : 'Igfnore this child. will be deleted shortly',
'issuetype' : { 'id' : '5' },
'parent' : { "id" : rootnn.key},
}
child = jira.create_issue(fields=rootnn_dict)
But the last child creation fails.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when i am giving issue type as 5 it is saying that give the proper issue type..please help me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.