Forums

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

automation rule to propagate specific label from epic to child issue not working

Evelyn Ramberger November 2, 2023

Hi ,

I am trying to set up an automation rule that gets triggered whenever an issue is created. If the epic that the issue is created in has the label "test", I want the issue to also receive the label "test" (I do not want to copy the other labels)

While this didn't seem complicated to set up, it's unfortunately not working for me.
I checked the JQL query when setting up the rule and it found the epic with the label "test". However, the label did not  get propagated when I created a task within the epic. In the rule audit log, I can see that the "issue did not match the condition ". It looks like

I already tried setting the JQL query to "parent", this did not change the performance


Any idea what I could do ? Any help is highly appreciated!

Screenshot 2023-11-02 at 14.24.00.pngScreenshot 2023-11-02 at 14.24.57.pngScreenshot 2023-11-02 at 14.24.27.png

2 answers

1 accepted

3 votes
Answer accepted
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.
November 2, 2023

Hi @Evelyn Ramberger 

That Issue Created trigger can fire so quickly that the issue's data is not yet available to the rule.  And so the actions / conditions / branches do not work as expected.

The work-around is to always adding the Re-fetch Issue action immediately after that trigger.  It will slow the rule by about a second and reload the data before proceeding with the other steps.

Kind regards,
Bill

Evelyn Ramberger November 3, 2023

thank you @Bill Sheboy this is much better than the workaround I set up!

Like Bill Sheboy likes this
0 votes
David Blank
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.
November 2, 2023

Hi @Evelyn Ramberger and welcome to the Atlassian Community!

 

This all looks good to me! Can you show us your Action to see if there could be something there?
 

David Blank
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.
November 2, 2023

I was able to get it to work in my organization like this: 

Screenshot 2023-11-02 at 12.03.48 PM.png

Evelyn Ramberger November 2, 2023

Hi David, thank you for your response!

I set up the action like this 

Screenshot 2023-11-02 at 17.08.09.png


I also just tried setting this up the same way as you did but it still does not work

Screenshot 2023-11-02 at 17.12.44.png

 

I keep seeing in the log that the issue did not match the condition; but the issue number is the number of the created issue and not the associated epic (Jira should be looking for the label in the epic not in the issue)

Evelyn Ramberger November 2, 2023

it seems that Jira is not looking up the issue in the related issue (although it is specified like this in the rule) 

David Blank
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.
November 2, 2023

In my case, in the audit log I do not see the issue key from the epic, I only see the issue that triggered it (created issue) and was subsequently updated:

Screenshot 2023-11-02 at 12.47.18 PM.png

David Blank
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.
November 2, 2023

@Evelyn Ramberger what if you tried changing your jql to:

labels in (test)

Evelyn Ramberger November 2, 2023

Thank you, that is good to know! But I still have no idea why the rule is not working for me
I tested JQL search when setting up, Jira finds the correct epicScreenshot 2023-11-02 at 17.55.08.png

David Blank
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.
November 2, 2023

@Evelyn Ramberger , could it be something with the rule actor? If you look under the Rule Details, you should see who that is. Can you confirm their access? (note: I always use "Automation for Jira" as my actor)

Evelyn Ramberger November 2, 2023

Thank you @David Blank , it is still not working.  I tried changing the JQL query, the rule actor is set to Jira. This is giving me quite the headache!

Like David Blank likes this
David Blank
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.
November 2, 2023

@Evelyn Ramberger have you checked that the scope matches the project your are triggering it from?

David Blank
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.
November 2, 2023

@Evelyn Ramberger this is part of the fun with automation tools, but the best part is the relief when it finally works! The more debugging, the more intense the relief feels :D 

Like Evelyn Ramberger likes this
Evelyn Ramberger November 2, 2023

Yes, the scope is equivalent to the project I am triggering from. I think I finally figured out  (somehow ) what the issue was. When I created a task within an epic by clicking "create child issue", the task was created but Jira only sets the parent field miliseconds afterwards (I did not change the parent fieldmanually, this must have been triggered by Jira in the background). 

 

Screenshot 2023-11-02 at 18.08.28.png

 

But my rule got triggered upon issue creation with an empty parent field. I modified the rule now in the following way and it seems to work.

 

Screenshot 2023-11-02 at 18.21.51.png

Like David Blank likes this

Suggest an answer

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

Atlassian Community Events