How do you get the smart commits to only transition workflows on the default branch? Currently when we push smart commits to a non-default branch is transitions the workflow. This seems like I must be missing something obvious.
Hello @Wyatt Mufson ,
Welcome to the Atlassian Community!
As outlined in the Process issues with smart commits documentation page, in order to transition an issue using smart commits you need to enter something like below text in the commit message:
<ignored text> <ISSUE_KEY> <ignored text> #<transition_name> #comment <comment_string>
The above commit message will make the issue having ISSUE_KEY transition to transition_name.
So, I believe what is happening in your case instead is that you have a workflow trigger that is making your issues transition on some specific conditions (e.g. commit created).
Can you kindly check if this is the case?
For further details:
Cheers,
Dario
When the commit message <ISSUE_KEY> #resolve is committed to any branch, it transitions the issue to resolved. What we need is for this to happen only if the commit being committed to the default branch (i.e. master). With the current behavior it closes the issue before a pull request is reviewed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Wyatt Mufson ,
I might be missing/misunderstanding something, but this seems to be the expected behavior: if in a commit message you explicitly tell to Jira to resolve an issue then Jira will transition that issue to resolved status.
Can you share a bit more details on what you are trying to achieve since there might be another way to get to the same results?
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We want Jira issues to close when the code that resolves it is merged into the default branch and not just any branch. Since this does not seem to be an out of the box feature of Jira we've decided to use a different product.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please notice nobody said it cannot be done in Jira, it was just mentioned that there is another/different way to do it.
Specifically: if you only want to close the issue when the code is merged into master, then you should either use a workflow trigger or an automation rule on the "pull-request merged" event.
For more details see also the below thread:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.