The commit retains the association even in the new project. The Git Integration for JIRA add-on supports history tracking. Thus, when moving a ticket to a new project whose issue key has changed, the association will still work.
The steps below provides an outline that you can follow to verify that the issue associations with commits are retained:
- Associate a commit with issue (ex. TEST-1)
- Move the issue TEST-1 to a new project (ex. PM)
- New issue key for TEST-1 is PM-18
- Check that original commit in TEST-1 is still available in PM-18. The commit should be there (Git Commits tab).
- In the Git Repositories configuration page, perform Reset and Reindex on the selected repository to make sure that the commit was in the correct location.
The Git add-on also supports multiple issue keys in a commmit message.