I am using Jira 7.6.1 and I created an issue which got assigned key TEST-21 and then I moved it to another project so that it got key PROJ-364. After moving I can still access the issue as TEST-21 which is good. However I then moved the issue back to project TEST and rather than it reusing the existing TEST-21 key that still points to it, it was assigned a new key of TEST-22. So now I can access the issue via TEST-21, TEST-22 & PROJ-364.
Would it be possible to discover whether there is an existing key for the destination project that already points to the issue and reuse that rather than create another key?