You can see the available custom workflow transition commands for use with smart commits by doing the following:
-
Open an issue and click View Workflow from the context of the issue’s status.
-
Hover a status.
When you hover a status – it will highlight available transitions. This is the transition name that is used in smart commits and not the status name.
Below is an example using the above workflow where the issue is in IN PROGRESS status and want to send it to CODE REVIEW status:
<ISSUE_KEY> #send-to-code-review _or_,
<ISSUE_KEY> #send-to-code _and even_,
<ISSUE_KEY> #send _(yes, this works, as long as it does not conflict with another transition name)_
Do note that invalid characters can be used in the transition name. Jira accepts most of them and they can be used. However, smart commits will only process letters and dash characters.
Thus, the part of the transition name up to the invalid character can be used for transitions; where spaces become “-“.
Example 1
Transition name | Smart Commit transition |
---|---|
SEND_TO_QA |
SEND |
SEND-TO_QA |
SEND-TO |
SEND TO_QA |
SEND-TO |
There must be at least one unique way to call each transition name. If you have multiple transition names from a single status that use the same word, the smart commits will fail.
Example 2:
Another example, where an issue status NEW has these two transition paths:
-
SEND_TO_DEVELOPMENT
-
SEND_TO_BACKLOG
The invalid characters are used before unique transition names are possible. Both will become “#SEND“. Therefore, they are not unique and these transitions will fail.
Example 3:
Finally, the transition names have spaces instead:
-
SEND TO DEVELOPMENT
-
SEND TO BACKLOG
Both of these transitions are smart commit-friendly and the possible transitions are:
-
#SEND-TO-D…
-
#SEND-TO-B…
The “…” indicates the truncation with the least character length to have the transition names be recognized as unique by Smart Commits. Any length shorter than this will fail the transition as explained in Example 2 above.