When a task is closed with a fix version and no alpha/beta version is available in Jira (e.g. no alpha/beta build planned) the fix version can only be set to the next release version.
In such a case the release process script should add/change existing build versions to the alpha/beta version when a alpha/beta build is created.
Example:
Current WIP is 3.1.7 with a 3.1.7-alpha.1 already done but no further alpha build is planned.
A task is finished and the fix version is set to 3.1.7 because that is the next version that is planned to release.
Another alpha build (3.1.7-alpha.2) is created but the task still has the, now incorrect, fix version of 3.1.7. This requires a manual change, which could be done automatically by the build script