jsonpython-3.xjira-rest-apipython-jiracustom-field-type

Not able to access a customfield in Jira Rest Api


I need to get the timestamp of the duration an issue was made the transition into "Waiting-for-Input" state. I tried to get this using custom_fields using this URL <{jira-base-url}/rest/api/2/field> I found out there is a custom_field for it which is as follows

{
        "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,
        },
}

But when I try to access this customfield I get an error like

AttributeError: 'PropertyHolder' object has no attribute 'customfield_13225'

The code which I am trying is

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

Need help to access this customfield.

I am using JIRA Rest API and using python 3.7


Solution

  • This customfield was blocked by my administrator. Had to request them to allow access to this customfield after which I was able to access this field.