hi folks,
i m getting 400 response while adding comment.
basically i want to add dictionary key,values as a comment.
Can you pls help me on this ?
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
comment_dict={}
comment_dict['project_name']=project_name
comment_dict['version']=release_label
comment_dict['envirnoment_name']=envirnoment_name
data = '{"body": comment_dict}'
jira_comment_url='https://jira.abc.net/rest/api/latest/issue/'+str(jira_tkt.upper())+'/comment'
print("jira comment url is",jira_comment_url)
response_8 = requests.post(jira_comment_url, headers=headers, data=data, auth=(username,password))
print(response_8)
Hi @anil kumar I'm not sure, what programming language you use. But it seems to mee that you create map comment_dict and you send it as a body. But you need to add body as String as described here: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.13/#api/2/issue-addComment. So instead of creating a map, you need to join some Strings together...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.