Forums

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

How can I set up a nested Jira Automation rule to automatically link Bugs to MigObjects via Tests in

Fabian Weber
June 23, 2026

Hello everyone,

I need assistance setting up a complex Jira automation rule in our Jira Space using Xray. Despite having the detailed specification and attempting manual configuration, I'm unable to successfully implement structure required for this workflow. I'm open to all possible ways to have a solution (like nested branching or lookup issues etc.)

Business Requirement

We need an automation rule that automatically creates Work item links between Bugs (Xray Work type) and MigObjects (work type) through their relationship with "Test" (Xray Work type) when a new Bug is created.

Workflow Logic generally:

  1. Trigger: Bug is created in Jira Space

  2. Step 1: Find Test Work items linked to the Bug via "is created by" link type

  3. Step 2: For each Test found, find MigObjects linked via "tests" link type

  4. Step 3: Create "relates to" links between the original Bug and each discovered MigObject

Goal: You can see all related (in a wider understanding) in the Screen of "MigObject"

1 answer

2 votes
Rudy Holtkamp
Community Champion
June 23, 2026

Hi @Fabian Weber ,

I think (not tested myself) you can do this by:

Create an automation 'flow 1'

With your flow:

Back to flow 1

When this flow is triggered you have the original issue (the bug) in the smart value {{webhookData.originalIssue}} and the Test Work item in {{issue}}. If more test work items were found in your flow then flow 1 will be triggered for each of these. Now we need to branch in this rule again to find all MigObjects 

  • Create a branch on linked work items, with link types 'test'
  • In the branch
    • Add action 'Link work items'
      Choose 'relates to'
      Use smart value {{webhookData.originalIssue}}

Now your MigObject is linked to the bug

Fabian Weber
June 23, 2026

Hello Rudy,

thanks a lot for your dedication and quick answer!

I think I already implemented the two automations so far.

Is this how you thought of the result?

Flow 1 .png2 Automation .png

Fabian Weber
June 23, 2026

fyi: When you said "Use X-Automation-Webhook-Token as the header key" - where did you find the token exactly?

I just used the webhook url for it. Please correct me if there is a better solution. :)

Rudy Holtkamp
Community Champion
June 23, 2026

Hi @Fabian Weber ,

For the first picture the branch should also be a 'For linked work items' not a branch on JQL. The rest looks like I intended.

Rudy Holtkamp
Community Champion
June 23, 2026

Ah wait, at the header key should be the word: X-Automation-Webhook-Token

And the value is the thing you paste from the other flow.

Like Fabian Weber likes this
Fabian Weber
June 23, 2026

Hi @Rudy Holtkamp ,

so far it is not possible to include the link type "test" directly:

Updated Automation.png

If I wanted to, I could use it as a condition. But if it is working like that, I'd be happy. 

Rudy Holtkamp
Community Champion
June 23, 2026

I thought that this:

Step 2: For each Test found, find MigObjects linked via "tests" link type

Meant that the MigObjects were linked via an issue link. But from your reply this is apparently not the case. So how are these linked?

Fabian Weber
June 23, 2026

The Worktype "MigObject" is linked to Test this way: "is tested by"

Relation MigObject to Test.png

And vice versa the Work Type "Test" is linked to "MigObject" this way: "tests"

Relation Test to MigObject.png

Rudy Holtkamp
Community Champion
June 23, 2026

Then the linked type 'tests' and 'is tested by' should be shown in the Linked work items.

The only thing I can think of is that the MigObjects are in a different space and that your flow scope does not include it. If this is the case, change the scope of the flow.

Fabian Weber
June 25, 2026

Hello Rudy, as I can see the action is still not executed correctly. I assume it is because of the type of linked issue.

As I cannot show you my whole instance, would it be okay to have a quick call to solve the problem? :)

Rudy Holtkamp
Community Champion
June 25, 2026

Sure, maybe tomorrow?

Fabian Weber
June 25, 2026

Would love to, thanks!

Here are available timeslots for me - always in CEST timezone to be sure:

- 11:30-12:15am

- 2pm-3 pm

- 3pm-3:30 pm

Feel free to send me an invitation for a call to my company address: removed-email

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events