I'm trying to add a post function to a transition where the purpose is to set the value of a sprint in a specific project to an issue.
To do so, I am using Nunjucks and have the following:
{{ issue | sprints("active") | first | field("id") }}
The problem is that this function, is reading sprints across all projects in our organization, sometimes resulting in an undesirable sprint value being added to the issue.
How can I return the active sprint ID for a specific project / do a check on the sprint name so that it runs again if the returned sprint isn't the sprint I want?
For context, the sprints within the specific project I want to pull from, use a "S##" name format. For the other projects, they use a different sprint name format.