I'm using ScriptRunner to iterate through the Sprints of an issue.
def sprints = issue.fields['customfield_10004'] as List<Map>
if (sprints == null)
logger.info("sprints = null")
else
logger.info("sprints = ${sprints}")
def fieldValues = sprints.each {
logger.info("it = ${it}")
}
2020-06-15 17:57:27.753 INFO - sprints = [com.atlassian.greenhopper.service.sprint.Sprint@3887136[completeDate=2020-05-21T02:38:11.056Z,endDate=2020-05-04T15:01:00.000Z,goal=,id=566,name=TSTDEV: Sprint 1,rapidViewId=214,sequence=566,startDate=2020-04-20T15:01:43.272Z,state=CLOSED], com.atlassian.greenhopper.service.sprint.Sprint@1e9b5d3[completeDate=<null>,endDate=2020-06-04T02:40:00.000Z,goal=,id=588,name=TSTDEV: Sprint 2,rapidViewId=214,sequence=588,startDate=2020-05-21T02:40:54.712Z,state=ACTIVE]] 2020-06-15 17:57:27.788 INFO - it = com.atlassian.greenhopper.service.sprint.Sprint@3887136[completeDate=2020-05-21T02:38:11.056Z,endDate=2020-05-04T15:01:00.000Z,goal=,id=566,name=TSTDEV: Sprint 1,rapidViewId=214,sequence=566,startDate=2020-04-20T15:01:43.272Z,state=CLOSED] 2020-06-15 17:57:27.789 INFO - it = com.atlassian.greenhopper.service.sprint.Sprint@1e9b5d3[completeDate=<null>,endDate=2020-06-04T02:40:00.000Z,goal=,id=588,name=TSTDEV: Sprint 2,rapidViewId=214,sequence=588,startDate=2020-05-21T02:40:54.712Z,state=ACTIVE]
I wouldn't expect the sprint related text in front of the values. How can I dereference the field values for each sprint?
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.