This is not possible with the standard install of JIRA Software but can be achieved with the use of the ScriptRunner plugin. See https://scriptrunner.adaptavist.com/4.3.0/jira/jql-functions.html#_agile for more details of the additional JQL functions provided to work with Agile.
It looks like you're new here. Sign in or register to get started.