如何使用 Python 更新 JIRA 中的自定义字段值?

How to update a custom field value in JIRA using Python?

我需要使用 Python 更新 JIRA 中的自定义字段。我检查了其他答案,他们只提供文本字段的解决方案。但是我有一个多值列表,我想使用 Python.

进行更新

我试过了,但没用。

issue.update(fields={'customfield_13090': {'value':'64'}})

我在 运行 那行

时收到此错误
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://test.jira.com/rest/api/2/issue/1400908679
        text: Can not deserialize instance of java.lang.Long out of START_OBJECT token
 at [Source: N/A; line: -1, column: -1]

我检查了列表字段,发现值 64 是我需要更新的选项值,如果我希望列表将实施服务作为所选选项。

<option selected="selected" value="64">
            Implementation Services
        </option>

谁能告诉我我的代码行中的错误是什么。

我认为你很接近,但应该只是这样:

 issue.update(fields={'customfield_13090': '64'})

如果这不起作用,我相信替代的指定解决方案是:

 issue.update(fields={'customfield_13090': [{'value':'64'}]})

这只是基于我对 configuring/updating JIRA 搜索的研究。

for a given 'customfield_13090': {
        'self': 'some link ',
        'value': '84',
        'id': '21104'
    }

下面的代码应该可以工作

issue.update(fields={'customfield_13090': {'value':'64'}})