JIRA key is case sensitive for the commit message in Stash

We are using the Stash/JIRA integration feature in our system.

Follow the intruction from page: http://quickstart.atlassian.com/download/stash/jira-integration

but when the jira key in the commit message is lower case. the stash will not be able to detect the jira key in the commit message.

e.g. commit message "abc-123, change somthing"

in stash, after this commit, the jira issue 'ABC-123' will not be added as a link.

how can we turn it to case-insensitive?

4 answers

1 accepted

0 votes
Accepted answer

Hi Jonny,

Internally we use a regex to index the JIRA issues. You can override the default by setting the following as a property when starting Stash. This is the same as our regex with [a-z] instead of [A-Z].


This will start to index issues from this point onwards. If you want to re-index commits already in Stash you will have to delete the cached index:


$STASH_HOME/data/snapshots (in Stash 2.11+)

As always, please backup your home directory (and maybe even the database) before performing any manual operation on Stash. My suggestion might be to test this on another copy of Stash before running in production.



2 votes


In order to keep track of this issue, please refer to the up-to-date Integrating with custom JIRA issue key Knowledge Base article.

Notice that at as of the 2.8 release, the name of the system parameter is changed.

You will need to configure your <Stash_Install>/bin/setenv.sh file like this:


Best regards,

Thiago Bomfim

Atlassian Support - Stash

Doesn't work for us. The variable is defined as follows for us:

JVM_SUPPORT_RECOMMENDED_ARGS="-XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError='kill -3 %p' -XX:HeapDumpPath=/opt/bitbucket/4.11.2/heap/dump -Dintegration.jira.key.pattern=\"((?&lt;!([A-Za-z]{1,10})-?)[A-Za-z]+-\d+)\""


I also couldn't find a call to the variable in start-webapp.sh. Do you know where it is called?

Just edit this line in setenv.sh so it looks like the following:


This will work on both, upper and lowercase formats.


is it possible to support Jira integration if Jira keys are uppercase (like IN-2242) and Stash branches are lowercase (like in-2242-some-description)? Currently Jira does not detect branches created in Stash for Jira issues.

We would like to avoid mixing uppercase and lowercase when creating branch names but our projects are already set up with uppercase ID's and we would like to keep it that way.

We use Jira OnDemand.


Darko Cerdic

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,193 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you