JMWE Cloud: Get the sprint with the latest start date from an issue
Issues worked on for multiple sprints may require retrieval of information from the most recent Sprint to which it has been assigned. However, suppose these sprints do not cohesively overlap (for example, multiple teams working on it with different sprint cadences). In that case, the last Sprint retrieved from the field may not necessarily be the latest one.
Instructions
You can retrieve the Sprint object for an issue by sorting the Sprints from the issue field.
Use the following script to get the Sprint with the latest start date:
{{ issue.fields["Sprint"] | sort(null, null, "startDate") | last }}For example, if you want the latest start date from the latest Sprint, you can use this:
{{ issue.fields["Sprint"] | sort(null, null, "startDate") | last | field("startDate") }}