Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA Issue key with number in project name

Tommy Brunn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 10, 2022

The default regex for extracting Jira issues from commits does not handle projects with numbers in the project name, which has been supported in Jira for 7 years or so.

https://scriptrunner.adaptavist.com/5.5.1/bitbucket/PreReceiveHooks.html#:~:text=at%20new%20ones.-,Require%20commits%20to%20be%20associated%20with%20a%20JIRA%20issue,-This%20requires%20each

The default regex according to the documentation is:

((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)

How can I adapt this to allow projects with numbers in them, such as "I18N-1234"?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

Hi @Tommy Brunn ,

please try the following regex :

([A-Z0-9_.-]{3,10}-\d+)

Hope this helps,

Fabio

TAGS
AUG Leaders

Atlassian Community Events