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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.