Unable to edit custom_field(Jira-Python)

混江龙づ霸主 提交于 2019-12-08 05:45:32

问题


Unable to update fields for an issue in Jira-python.

When I look at the raw data in JSON. It is under:

{fields:{'customfield_10000':'some text'}

but when I tried:

issue.update(fields={'customfiled_10000':'edited'})

issue.update({'customfiled_10000':'edited'})

issue.update({fields:{'customfiled_10000':'edited'}})

issue.update(customfiled_10000='edited')

All gave me

response text = {"errorMessages":["Internal server error"],"errors":{}}

Tried added +"0000" in Client.py

data['started'] = started.strftime("%Y-%m-%dT%H:%M:%S.000%z")+"+0000" still not fixing the issue. Please Help~!!

New findings, when I create a new issue

issue= jira.create_issue(fields=root_dict)

and i can edit this issue oject using issue.update with no problem

However, when I get the existing issue using

issue = jira.issue('JRA-123')

editing this issue using issue.update gives me internal error.


回答1:


You have a typo in the update part customfiled should be customfield

issue.update({'customfiled_10000':'edited'})


来源:https://stackoverflow.com/questions/46921481/unable-to-edit-custom-fieldjira-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!