Go to the project settings.
Then the workflow section and the desired process.
Then click the edit button and select the desired transition between statuses, select the conditions section and add a new condition.
Select "Only Active Sprint Issue Condition" from the list and click Add.
Then publish a new version of the process.
Configure advanced issue workflows