Integrating with custom JIRA issue key

Troubleshooting JIRA Integration

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community


JIRA has a UI to help specify a custom issue key format. When integrating with Stash, these custom JIRA issue keys are not recognized by Stash and hence commits are not linked to the JIRA issues.


Stash passes commit messages through a regex pattern to identify and create links. The custom JIRA issue key format will not work with the default pattern that Stash is shipped with:



 Follow the steps below to modify the regex pattern:

1) Shut down Stash.

2) Edit the contents of the <Stash installation directory>/bin/ or <Stash installation directory>/bin/setenv.bat (depending upon your OS) and add the modified regex to the variable JVM_SUPPORT_RECOMMENDED_ARGS.

3) Save the file.

4) Remove the contents of the following folder:

VersionFolder location
Up to 2.10.x<STASH_HOME>/caches/idx-snapshots


5) Restart Stash.

6) Push to the repository with the JIRA issue key in the commit message to force a reindex of the data.


For example, to match JIRA keys such as C001-1 or ABC123-1, set the variable as follows:

Pre 2.8:






If the parameter is set correctly the following line will be logged in the <STASH_HOME>/log/atlassian-stash.log:

2012-10-23 13:43:16,805 INFO  [main]  c.a.s.i.jira.idx.JiraKeyIndexer Using custom JIRA key pattern: ((?<!([A-Z0-9]{1,10})-?)[A-Z0-9]+-\d+)

Last modified on Nov 2, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.