Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set priority, due date while creating JIRA issue in python

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?

like image 988
Sibtain Avatar asked Jan 26 '26 17:01

Sibtain


1 Answers

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

like image 105
alecxe Avatar answered Jan 28 '26 07:01

alecxe