Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jir automation

Dmitri Vaschuk December 24, 2024

Good evening guys.

I need to create an automation, where if changes were committed to sandbox , issue should be moved to QA stage , how can I do it? Tried multiple options , not really working

Screenshot 2024-12-24 at 23.19.58.png

3 answers

0 votes
infectioncontrol Expert
Banned
December 24, 2024

To automate moving an issue to QA when changes are committed to the sandbox, set up a rule in Jira Automation like this:

  1. Trigger: Use the "Commit created" trigger (from the Development category).
  2. Condition: Add a condition to check if the branch/environment matches "sandbox."
  3. Action: Use the "Transition issue" action to move the issue to the QA stage.

Ensure proper permissions and mappings are in place for the workflow. For "infection control experts," incorporate the term in issue summaries or commit messages where relevant.

 

Dmitri Vaschuk December 25, 2024

Hey Did as described, nothing happens despite I committed to sandbox.
What I did in a wrong way?

Screenshot 2024-12-25 at 12.12.26.pngScreenshot 2024-12-25 at 12.12.42.pngScreenshot 2024-12-25 at 12.13.17.png

0 votes
Trudy Claspill
Community Champion
December 24, 2024

Hello @Dmitri Vaschuk 

Welcome to the Atlassian community.

Disclaimer: I don't have a Jira environment that is integrated with development tools so I cannot execute rules that relate to commits, branches, and pull requests.

 

What is the output in the rule execution Audit Log for when this rule runs? That should tell you if the conditions are passing or failing. It should also tell you if the Transition Issue action is able to execute, and if it isn't then it should tell you why.

You may also want to insert Log Actions immediately after the Trigger and before the Conditions.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

Use those actions to print into the rule execution Audit Log the actual values of the smart values you are trying to evaluate in your Conditions. That way you can confirm those smart values are set as you expect them to be.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2024

Hi @Dmitri Vaschuk -- Welcome to the Atlassian Community!

For an automation question, please also post an image of the audit log details showing the rule execution.

Until we see that, what is not working as you expected? 

Have you tried writing the commit smart value information to the audit log to compare to what you are testing: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/#--commit--

Kind regards,
Bill

Dmitri Vaschuk December 25, 2024

Here is how I tried initially, commit branch condition is not working here.
No actions performed. Despite commit branch was sandbox

Screenshot 2024-12-25 at 12.16.21.pngScreenshot 2024-12-25 at 12.17.07.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2024

My understanding is the branch smart values are only available with the branch-related triggers, and not the commit ones.

Did you try writing the smart value you are testing in the condition to the audit log to observe what it contains?  That is what both Trudy and I were suggesting.

Dmitri Vaschuk December 27, 2024

First of all thank you guys!
Now I know how to work with audit log extended options.

Seems that {{commit.branch}} is not working and it's not listed in documentation even as possible one (sorry chat GPT, you were wrong).

Do you see any other way to run automation using commit to sandbox event? Maybe some jql magic?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2024

From the commit smart values, such as the repository, can you determine if the sandbox was used?

If not, you may need to use the commit information to call the REST API endpoints for your source control tool, using the Send Web Request action in the rule.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events