Hello, our team wants to integrate JIRA and github and start to use automation.
Our repository has the following git flow strategy.
If we make new issue named 'TEAM-1', these 3 branch exist.
- dev
- QA
- TEAM-1/blahblah
Before deployment, we merge 'TEAM-1' branch to 'QA' branch by Pull Requests. After tests ends, 'TEAM-1' branch is merged to 'dev' branch.
When TEAM-1 -> QA PR merging, I want to set state of JIRA from 'In Progress' to 'Reviewing'. TEAM-1 -> dev mergeing, I want to set state JIRA from 'Reviewing' to 'Done'.
However, I can't find a way to distinguish PR by where branch they will merged in.
Can't automation rules be applied depending on the what branch they will be merged in? Thanks.
Hi,
If you were using the workflow triggers alone in Jira, I don't think their will be a way to distinguish between the branches. However if you use Automation within Jira, then you can actually use a smart value to do this. Check out {{pullRequest.destinationBranch}} the documentation in that link explains that you can use the smart value of {{pullRequest.destinationBranch}} to return the name of the branch you are merging into.
In that case, you could then setup an automation rule like this one:
Which can then be setup to perform an action such as transition. In my screenshot the transition is going to in progress, but it sounds like you want to transition to the In review state instead.
Try that and let me know if this works in the way you are expecting here.
Andy
Thank you, Andy. Your solution is amazing. We have succeeded in building satisfactory automation with your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.