I want to create a jira issue in python. I know how to set the summary, issue type, description and project name but I can't find how to set priority, due date, environment and other fields.
This is what I know:
new_issue = jira.create_issue(project={'key': 'key'}, summary='New issue from jira- python', description='Look into this one', issuetype={'name': 'Bug'})
How can I set the other fields?
The question is really about the Jira REST API itself, not the python client, since it is a very thin layer.
According to the Issue Fields in JIRA REST APIs, priority can be set this way:
new_issue = jira.create_issue(project={'key': 'key'},
summary='New issue from jira-python',
description='Look into this one',
issuetype={'name': 'Bug'},
priority={'name': 'Major'})
As for the other fields, use the REST API Browser (RAB) to inspect what other fields are available for filtering issues in a particular project (as you may know fields can vary from project to project).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With