Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Questions to create a JIra automation

Rodrigo Xavier June 9, 2023

Hello everyone, everything good?

lease, I believe that this doubt is basic for many, but ultimately I was not able to reach the result I expected.
I have a project and within them there are hundreds of Components, I would like to make an automation that does the following:

  1. Trigger when creating a subtask.
  2. Make a public comment.
  3. Assign those responsible
  4. After all change the status to Done.

My problem is that when creating this automation it is functional in all my project, that is, whenever someone creates a subtask (in any component) the automation works.
I just wanted it to work in a single component, so it doesn't hurt other teams.
I don't know if I managed to explain it well, but the attached print, and the automation I created.

Jira.PNG

3 answers

3 votes
Tim Perrault
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.
June 9, 2023

Hi @Rodrigo Xavier 

 

I think I understand what you want. I would try something like I have in my screenshot:

01ja.png

Rodrigo Xavier June 9, 2023

Hi, @Tim Perrault sorry I didn't see your message.
Thanks a lot for his answer.
I don't know if it could be the configuration that my organization made but I don't see some components and fields, as I see in my test environment.
I tried to use this same rule, but I didn't find the Issue Type for example.
Would it be possible to do this with JQL?

 

Jira3.PNG

Tim Perrault
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.
June 9, 2023

Both the conditions I used were the Issue fields condition. Are you not able to select Issue Type in the Field section?

00ja.png

But yes using the JQL condition should also work.

 

issuetype = Sub-task

Like Rodrigo Xavier likes this
Rodrigo Xavier June 9, 2023

I managed to find the field, I was looking in the wrong place sorry. I did the same test as your print and then I reversed the component, in both cases it shows the message.

ACTION DETAILS:
        ISSUE CONDITION
        The following issues passed:
        LPBRI-663

ISSUE CONDITION:
       The following issues did not match the condition:
       LPBRI-663
Tim Perrault
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.
June 9, 2023

So the rule did not work? Can you post a screenshot of your rule?

Rodrigo Xavier June 9, 2023

Of course.
The 04:32:38 log was generated following your example (your print)
The 04:34:33 log was generated according to the current image.

Jira4.PNG

Tim Perrault
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.
June 9, 2023

ok it looks like the sub-task LBRI-663 does not have a component when it is created. When you create a sub-task does it have a pop-up screen where you can add the component? Basically the component will need to be on the issue when you are creating it. If you add the component later the automation won't do anything.

Rodrigo Xavier June 9, 2023

Na verdade, quando a subtarefa é criada, ela é criada sem o campo do componente preenchido, somente depois de criada ela aparece.
Na impressão, a tarefa tem o campo componente preenchido corretamente.
Depois de criar a subtarefa, o campo não é preenchido.
Com base na sua análise, eu já deveria criar essa subtarefa com o campo Componente corretamente preenchido como Governança, correto?

Jira5.PNGJira6.PNG

Tim Perrault
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.
June 9, 2023

yes the component field will need to be filled in if your trigger is when an issue is created to work. You could use the Field value changed trigger if you didn't want the rule to run on creation.

Rodrigo Xavier June 9, 2023

Automation this way works, however any subtasks that are created in any component will use my rule.
These are the components I have in my project.
And the idea is that the rule only works when subtasks are created in the Governance component.Jira7.PNGJira8.PNG

Tim Perrault
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.
June 9, 2023

You could use the issue updated trigger and add the condition for component back. That should work I think.

000ja.png

Like Rodrigo Xavier likes this
Rodrigo Xavier June 9, 2023

I will test it and post the result here.
Tim thank you very much for your patience and cooperation.
Here in Brazil it's already 18:20 pm on Friday, the body has to rest a little. rsrs
As soon as I test it I'll let you know.

1 vote
Rodrigo Xavier June 13, 2023

Hello @Tim Perrault @Hana Kučerová everyone, everything good?
Tim managed to do the automation here.
I left it that way and even acted ps other teams didn't complain about subtasks being automatically closed, so I believe I managed to reach the desired result. Now just refine the code.
Thank you very much for your partnership and help. Automation was like that.

Jira9.PNG

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2023

Hi @Rodrigo Xavier ,

welcome to the Atlassian community!

I believe what you need is to set the scope of the rule to the single project.

It can be found in the Rule details section.

Rodrigo Xavier June 9, 2023

Hi @Hana Kučerová 

Thanks a lot for the quick feedback.
I had looked before but I didn't find any relationship.
Would I have to change the "Actor" field?Jira1.PNG

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2023

Thank you.

I can see the scope is ok - single project LPBR ICT.

I didn't understand you correctly.

Probably @Tim Perrault is right, you need to add condition with your component.

Like Rodrigo Xavier likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events