We have a project with two teams (lets call these Team1 and Team2) and therefore two open sprints (we'll call these Team1SprintX and Team2SprintX, where X is a running number for each team) at any given time.
When I want to search for issues on active sprint for only Team1 I use sprint in openSprints() and sprint = "Team1Sprint", which basically returns the issues nicely.
But when tasks are passed from one team to another, things get difficult. If, for example, task has been on Team1's sprint Team1Sprint1, the sprint was closed and Team2 continues the work on their Team2Sprint2, the above query returns also this task, since it is on open sprint and list of sprint names contains Team1Sprint.
As I understand there is no option to search only the active sprint by its name (or part of it) and no possibility to use substrings, how should this be solved?
And to clarify, I don't want to explicitly use the sprint id, because I'm using this on a board that we use from one sprint to another.