Not able to access a customfield in Jira Rest Api

Rocky January 4, 2022

 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

3 answers

1 accepted

0 votes
Answer accepted
Rocky February 8, 2022

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.

Thanks for the replies @Pramodh M and @Claudio Gonzalez .

Christel Gray August 1, 2023

I'm curious how the field was blocked by the administrator. I know this is an old post, but I'm curious how they did this in Jira Cloud.

Like Perry Tancredi likes this
Sravan Duddella November 30, 2023

We are running into the similar issue, could you post an update on how this was blocked, and the steps performed to unblock it? 

1 vote
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 6, 2022

Hi @Rocky 

Please use the below Python Wrapper API to get the details

This one for authentication

https://atlassian-python-api.readthedocs.io/#other-authentication-methods

And this one for getting the Issue details

https://atlassian-python-api.readthedocs.io/jira.html#manage-issues

Let me know if you have any query, the API calls are straight forward

Thanks,
Pramodh

Rocky January 7, 2022

Hi @Pramodh M , thanks for answering,but my question was very specific to the customfield I have mentioned here.I am not able to access this customfield in particular whereas I am able to access the customfield_13800 specified below

{
    "id": "customfield_13800",    "name": "Development",    "custom": True,    "orderable": True,    "navigable": True,    "searchable": True,    "clauseNames": ["cf[13800]", "Development"],    "schema": {
        "type": "any",        "custom": "com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary",        "customId": 13800,    },},


While I notice that the schema[custom] values are different for both the customfields ,I need help in accessing customfield_13225

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2022

Hi @Rocky 

Can you please check whether the Custom field with ID 13225 is present in Jira

Rocky January 7, 2022

Yes it is present

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2022

See if you are able to implement the solution as in this post and get the details for that Custom field you are looking for

https://community.atlassian.com/t5/Jira-questions/JIRA-cloud-returning-issue-to-python/qaq-p/1904902#M513697

Thanks,
Pramodh

1 vote
Claudio Gonzalez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2022

Hi @Rocky ,

You can use this rest/api/3/issue/<issue> (get). When the API return the values you can get the customfield_13225.

Rocky January 4, 2022

Hi @Claudio Gonzalez, could you please elaborate on this point. If you could provide some pythonic examples, it would help me in a great way.

Suggest an answer

Log in or Sign up to answer