0

我需要获取问题转换为“等待输入”状态的持续时间的时间戳。我尝试使用此 URL <{jira-base-url}/rest/api/2/field> 使用 custom_fields 来获取此信息,我发现它有一个 custom_field,如下所示

{
        "id": "customfield_13225",
        "name": 'Days in "Waiting-for-Input"',
        "custom": True,
        "orderable": True,
        "navigable": True,
        "searchable": True,
        "clauseNames": ["cf[13225]", 'Days in "Waiting-for-Input"'],
        "schema": {
            "type": "string",
            "custom": "com.onresolve.jira.groovy.groovyrunner:scripted-field",
            "customId": 13225,
        },
}

但是当我尝试访问这个自定义字段时,我收到一个错误,例如

AttributeError:“PropertyHolder”对象没有属性“customfield_13225”

我正在尝试的代码是

issue = jira.issue('ABC-1')
print(issue.fields.customfield_13225)

需要帮助才能访问此自定义字段。

我正在使用 JIRA Rest API 并使用 python 3.7

4

1 回答 1

0

此自定义字段已被我的管理员阻止。必须要求他们允许访问此自定义字段,之后我才能访问此字段。

于 2022-02-09T02:50:16.627 回答