Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Not able to access a customfield in Jira Rest Api

 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

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 .

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

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.
Jan 06, 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

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.
Jan 07, 2022

Hi @Rocky 

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

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.
Jan 08, 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.
Jan 04, 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.

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