We use jira to display the environment an issue has been deployed to. That works well with bitbucket pipelines and a commit messages that contain the jira issue name.
normal case:
- work on issue
- commit work with commit message ABC-123
- merge those changes into a branch, let's say staging branch
- push staging branch
- pipelines runs and marks issue as deployed on staging
- jira displays environment under "releases" on issue

special case "reopening an issue":
- when deployed on staging and a problem is found we reopen the issue
- the developer makes the correction
- commits work with commit message ABC-123
- merges those changes into a branch, let's say staging branch
- pushes them in the staging branch
- pipelines runs, but the issue is already marked as on staging
- hence for reopened, newly resolved issues we can't keep track on which environment they have been deployed
The only solution is to create a new issue and not reopen issues. Is there any best practices. ideas how to better handle this?