Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

Stash assumes that JIRA issue keys are of the default format (that is, two or more uppercase letters ([A-Z][A-Z]+), followed by a hyphen and the issue number, for example STASH-123). By default, Stash will not recognise custom JIRA issue key formats.

 

You can use custom JIRA issue key formats with Stash by editing either the <Stash installation directory>/bin/setenv.sh or <Stash installation directory>/bin/setenv.bat file, depending upon the OS platform.
To override the default issue key format, depending on your Stash release, pass the  -Dstash.jira.key.pattern=<some different regex> or -Dintegration.jira.key.pattern=<Some different regex> parameter to the JVM_SUPPORT_RECOMMENDED_ARGS property, like this:

Notice that the parameter name changed as of release 2.8.

Pre 2.8:

JVM_SUPPORT_RECOMMENDED_ARGS="-Dstash.jira.key.pattern=\"(<Some different regex>)\""

2.8+:

JVM_SUPPORT_RECOMMENDED_ARGS="-Dintegration.jira.key.pattern=\"(<Some different regex>)\""

For example, to use lowercase letters in issue keys, use a regex as in:

Pre 2.8:

"-Dstash.jira.key.pattern=\"((?<!([a-z]{1,10})-?)[a-z]+-\d+)\""

Or

2.8+:

"-Dintegration.jira.key.pattern=\"((?<!([a-z]{1,10})-?)[a-z]+-\d+)\""

Refer to this knowledge base article for the detailed procedure.

As always, please back up your home directory (and perhaps the database) before performing any manual operation on Stash. Consider testing this change on another copy of Stash before using it in production.

  • No labels