hello
I want to get only the Sprint's name of an issue using jira-python
when I Type
issue.fields.customfield_10006
the answer I get is
['com.atlassian.greenhopper.service.sprint.Sprint@2119aef0[id=111,rapidViewId=14,state=FUTURE,name=Sprint 18-S08,goal=,startDate=<null>,endDate=<null>,completeDate=<null>,sequence=111]']
How can I just get 'Sprint 18-S08' ?
I tried issue.fields.customfield_10006.name but it doesn't work
Hi Christophe,
I was able to accomplish this with a bit of regex that filters out the extra data. Hope this helps.
issues_in_project = jira.search_issues('project=ALPHA AND SPRINT not in closedSprints() AND sprint not in futureSprints()')
for value in issues_in_project:
for sprint in value.fields.customfield_10006:
sprint_name = re.findall(r"name=[^,]*", str(value.fields.customfield_10006[0]))
print sprint_name
Does issue.fields.customfield_10006['name'] work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no :-( it doesn't
neither issue.fields.customfield_10006[x]
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.
Hi, you can do the following:
custom=issue.fields.customfield_10006
for x in custom:
print(x.name)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.