Smart commit is not working for transitioning issues status

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Jira smart commits for issue transitions fails in Github when underscore ("_") is used in the status names

Environment

Jira Data center 8.x and above.

Diagnosis

Configure logging and profiling to enable debug loggings for package com.atlassian.jira.plugin.devstatus.smartcommits. Following errors can be seen in the logs:

1 2 3 4 2023-12-27 12:36:35,761+0100 http-nio-8080-exec-6 DEBUG xxxx xxxx - xxx.xxx.xxx.xxx /rest/bitbucket/1.0/webhook/github [c.a.j.p.devstatus.smartcommits.DefaultSmartCommitsService] Smart Commit processing resulted in errors: [Error[devstatus.smartcommits.transition.ambiguous: The 'InProgress' command didn't match a unique transition. The available transitions for the ABC-628 issue (In Progress) are: InProgress_Done, InProgress_Cancelled, InProgress_OnHold]]

As per the above log message smart commit is failing to make a transition. It considers InProgress_Done, InProgress_Cancelled and InProgress_OnHold not as unique transitions due to underscore ("_") present in their names.

Cause

Github considers the underscore ("_")  as ambiguous and has some restrictions around its usages and hence the issue. 

Solution

As a workaround either rename the above transitions to have complete unique names such as InProgressDone, InProgressCancelled and InProgressOnHold or replace underscores ("_") with hyphen ("-") i.e. InProgress-Done, InProgress-Cancelled and InProgress-OnHold

Updated on March 14, 2025

Still need help?

The Atlassian Community is here for you.