Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,503
Community Members
 
Community Events
165
Community Groups

Posting comment to Jira ticket in python

It is almost amusing, and yet frustrating.

url = {baseurl}/rest/api/latest/issue/{issueKey}/comment
body = {"body": "To change the way a picture fits .."}
r =  self.session.post(url=url, data=data), verify=False)

response

{"errorMessages":["Unexpected character ('b' (code 98)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: com.itlab.jira.plugins.extender.helper.RequestWrapper$1@537622; line: 1, column: 2]"]}

 What on God's green earth does it even mean?

2 comments

Ah, nevermind, it has to be a string (not json).

DPK J Community Leader Dec 03, 2019

Yup! you got that right.

@DPK J : can I post HTML string and parse it as wiki string?

DPK J Community Leader Dec 24, 2020

@Gokul Ramanan I don't think that is possible. You have to send format accepted by comment field only otherwise it will get converted to text.

Comment

Log in or Sign up to comment
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you