Hi Everyone,
As title, How do I get the sprint start date using Behaviours? Is it possible? Thank you very much!
Best Regards,
Kris
Hi,
Below code might help. But, bear in mind that an issue can have multiple sprint values, and this script returns the date of first sprint.
Sorry that I was not able to test the code, but it would guide you to a running version
import com.atlassian.jira.component.ComponentAccessordef customFieldManager = ComponentAccessor.getCustomFieldManager()def sprintCf = customFieldManager.getCustomFieldObject(10000) // id of Sprint customfieldreturn issue.getCustomFieldValue(sprintCf)?.startDate?.first()?.toDate()
Thanks for your answer. However, It showed an error which is "issue is not undeclared". How should I fix this error? Thank you very much!
Even I changed it to underlyingIssue, it will also show there is no property for startdate. Please help me on it. Really appreciate!
Hi Kris,
Ignore that error and try to run the code.
Groovy is a dynamic scripting language in which you can code without defining static types.
It looks like you're new here. Sign in or register to get started.