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?
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].
-Dstash.jira.key.pattern="((?<!([a-z]{1,10})-?)[a-z]+-\d+)"
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/caches/idx-snapshots
$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.
Cheers,
Charles
Hi,
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:
JVM_SUPPORT_RECOMMENDED_ARGS="-Dintegration.jira.key.pattern=\"((?<!([A-Za-z]{1,10})-?)[A-Za-z]+-\d+)\""
Best regards,
Thiago Bomfim
Atlassian Support - Stash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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=\"((?<!([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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just edit this line in setenv.sh so it looks like the following:
JVM_SUPPORT_RECOMMENDED_ARGS="-Dstash.jira.key.pattern='((?<!([A-Za-z]{1,10})-?)[A-Za-z]+-\d+)'"
This will work on both, upper and lowercase formats.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.
Thanks,
Darko Cerdic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.