Hi,
I wanted to create gitlab branch whenever a jira cloud issue is transitioned to Inprogress. The gitlab repo is integrated and the project is determined by the issue label and Affect version. So issued a template for the automation and designed this logic;
So it doesn't create if the label is "no_branch_needed". But if the label is cms and the Affect Version is medical_center, then it creates a branch on cms project, from medical-center branch. If the label is patient-api and the Affect Version is medical-center, then it creates a branch on patient-api project, from medical-center branch.
The problem is, there could be 2 or more labels and 2 or more Affect versions. Which means the automation rule executes the rule according to the condition met first, since I have else conditions after the first if branch.
I may not have cleared up the condition, please let me know if you need any clarification. Thank you for your help in advance.
I think the best way is to witch from the else if statements and actually go to branching. This way the rule will cycle through all branches and not just stop at the first one.
So the rule would now look something like below:
Trigger - transitioned from to do -> in progress
Branch 1
condition - version = XX & label = XX (personally I'd switch away from JQL statements and use the issue fields condition. It is simpler and faster)
Action - Create Git Branch
Branch 2
Repeat for other scenarios
I'd also remove the no label condition since it wouldn't be required from what I understand of the rule.
Any questions let me know :)
Hi @Dan.Tombs
Thank you for the answer.
There are two branching options on the cloud jira software. Should I use Advanced branching (with smart values) or Branch rule / related issues (for current issue), then add condition for every branch?
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.