I've managed to pull in a list of issues, and found that apparently Sprint is stored as customfield_10003 in our Jira instance. I want to manipulate the data in python dataframes, push it to reporting software, whatever.
But I'm running into problems trying to get the sprint names into a useful format in a list or dataframe. I've been looking all over but I can't seem to find a solution that works.
Code:
issues_in_project = jira.search_issues('project IN (proj_name)')
for value in issues_in_project:
print(value.fields.customfield_10003)
Returns a list like:
None
None
None
[<jira.resources.PropertyHolder object at 0x0000016A46C49E70>]
[<jira.resources.PropertyHolder object at 0x0000016A46C4A8F0>]
[<jira.resources.PropertyHolder object at 0x0000016A46C4B1F0>]
None
None
The "none" entries prevent me from calling value.fields.customfield_10003.name, with the following error:
"AttributeError: 'NoneType' object has no attribute 'name'"
I've found a solution like this:
for sprint in value.fields.customfield_10003:
sprint_name = re.findall(r"name=[^,]*", str(value.fields.customfield_10003[0]))
print(sprint_name)
But again, same error as I listed above.
So, the main question: what is the best way to export Issues data including Sprint?