Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
This widget could not be displayed.
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