JIRA Commit checker in Bitbucket Server/Data Center is unable to recognise valid keys from certain JIRA projects in the commit message (like UTF-x, UTC-x, GMT-x etc)
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When the Jira commit checker is enforced (must contain JIRA issue key) either at Project or Repository level, it fails to identify valid keys from certain Jira project (like UTF-x, UTC-x, GMT-x etc) in the commit message and hence rejects the commit.
Environment
All
Diagnosis
- Check if JIRA Commit Checker is enforced at the project or repository level (requires admin permissions).
Settings → JIRA Issues
- Check if the JIRA Project key is one these formats : UTC, GMT, ISO, SHA, AES, UTF, RFC
Cause
This behaviour is due to the configuration parameter plugin.jira-commit-checker.project.key.ignore.
As mentioned in the document
The following project keys will be ignored when validating commit messages. The main use case for this are keys that look like Jira keys but are not in fact Jira keys (eg. UTF-8). This value is a comma-separated list and is case-sensitive.
Solution
You can override the default values by specifically defining this configuration parameter in the bitbucket.properties file as per your requirement. In the example shown below we have remove UTF from the ignored values. Remember to restart Bitbucket for the configuration to take effect.
plugin.jira-commit-checker.project.key.ignore=UTC,GMT,ISO,SHA,AES,RFC