Update Field using Python

Good morning, 


I am trying to update a custom field in Jira, using the following code and I'm getting a 415 error code. Any help would be greatly appreciated! 


import json
import requests

jiraSession = requests.Session()

username = input("username: ")
password = input("password: ")
jiraURL = 'http://ourbaseurl.jira.com'

#-------------- CALL -----------------

searchAPI = jiraURL + '/rest/api/2/issue/ISSUE-1'
holder = requests.put(searchAPI, auth=(username, password), data=
"value": "FIELD VALUE"


1 answer

Hi Ishrat,


You can do 

issue = jira.issue('ISSUE-1')

issue.update(fields={'summary': 'new summary', 'description': 'A new summary was added'})

Thanks!   I was trying to avoid using the jira python library because it runs kind of slow. Though, my custom field is a Tempo field, so I'm assuming that's what's causing my issues. 

This is what i mostly use, haven't had any issues or tested with a Tempo field. I'll take a look.

I still appreciate your help! I will go ahead and use the jira-python library. 

Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

591 views 6 10
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot