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, however note that integrations with JIRA can depend on using the default issue key format in both JIRA and Stash. See Integrating using custom JIRA issue keys for more details.

Configure Stash to recognize custom issue key formats by editing <Stash installation directory>/bin/setenv.sh (on Windows, edit <Stash installation directory>/bin/setenv.bat instead).

To override the default issue key format, use the JVM_SUPPORT_RECOMMENDED_ARGS property, like this:

Stash 2.8, and later:
JVM_SUPPORT_RECOMMENDED_ARGS="-Dintegration.jira.key.pattern=\"(<Some different regex>)\""
Stash versions up to 2.7.x:
JVM_SUPPORT_RECOMMENDED_ARGS="-Dstash.jira.key.pattern=\"(<Some different regex>)\""

Notice that the parameter name was changed for Stash 2.8.

You will need to restart Stash.

 

For example, to use lowercase letters in issue keys, use a regex with the parameter like this:

Stash 2.8, and later:
"-Dintegration.jira.key.pattern=\"((?<!([a-z]{1,10})-?)[a-z]+-\d+)\""
Stash versions up to version 2.7.x:
"-Dstash.jira.key.pattern=\"((?<!([a-z]{1,10})-?)[a-z]+-\d+)\""

See also Reindex JIRA issue keys.

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