Hi All,
I am trying python code getting info from Jira and create some metrics for our project.
below are two lines of codes. Python-Jira
issues_epic = jira.search_issues('issuetype = epic and project in ("Immuno Process") AND created >= -90d',maxResults=None)
epic_fixversion = Counter([str(issue.fields.fixVersions) for issue in issues_epic])
print(epic_fixversion)
get output as follow
Counter({"[<JIRA Version: name='v2.6.0 Inc3', id='16506'>]": 14, "[<JIRA Version: name='2.6 inc 2', id='16503'>]": 5, "[<JIRA Version: name='3.0 Inc 2', id='16029'>]": 3, "[<JIRA Version: name='3.0 Inc 3', id='16410'>]": 3, "[<JIRA Version: name='2.5', id='16024'>, <JIRA Version: name='2.6 inc 2', id='16503'>]": 1})
How to remove the tags <JIRA Version: name>...I need only the values 'v2.6.0 Inc3' in the counter keys..not the tags as well.
This works fine for the resolution Jira field
temp_resou = Counter([str(issue.fields.resolution) for issue in issues_stories])
Counter({'Done': 246, 'None': 92, 'Fixed': 22, 'Resolved': 8, "Won't Do": 6, 'Duplicate': 3})
you need to iterate by method like
for i in Counter:
print(i.name)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.