You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
When trying to fetch custom fields via the rest API I keep receiving [<jira.resources.PropertyHolder object at .........>] and I cannot access the values in this field. What do I do?
import pandas as pd
from jira import JIRA
import requests
# Disable SSL certificate verification
requests.packages.urllib3.disable_warnings()
# Jira credentials
username = " "
api_token = " "
jira_url = " "
# Project key
project_key = " "
# Connect to Jira
jira = JIRA(server=jira_url, basic_auth=(username, api_token), options={'verify': False})
# Construct JQL query
jql_query = f"project = '{project_key}'"
field_names = list(field_names)
# Iterate over each issue and extract field values
for issue in issues:
issue_data = {}
for field in field_names:
if hasattr(issue.fields, field):
# Standard fields
value = getattr(issue.fields, field)
elif field == "Issue key":
value = issue.key
elif field.startswith("customfield_") and field in issue.raw["fields"]:
value = issue.raw["fields"][field]
else:
if isinstance(value, dict):
value = extract_value(value)
value = value.value
issue_data[field] = value if value is not None else ''
#Convert complex objects to their string representation
if field == "complex_field":
if hasattr(value, "custom_attribute"):
value = value.custom_attribute
issue_data[field] = value
data.append(issue_data)
print(f"Issue Key: {issue.key}")
# Create a DataFrame from the extracted data
df = pd.DataFrame(data)
Hi,
Can you show us your script ? Do you use a module like Jira Python ?
I included a snippet of what I receive below and a snippet of my code above above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.