Forums

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

How to: use a value from a linked issue in an automation?

Kent G
Contributor
February 17, 2026

Context:

  1. There is a task in a Jira Software project.
  2. There is a service request in a JSM project.
  3. They are linked.
  4. The JSW task "is the delivery ticket for" the service request.
  5. The JSM service request "is the intake ticket for" the task.
  6. There is an automation that will be triggered from the JSW project, let's just say manually for the time being.
  7. That automation should do this:
    1. When manually triggered from the JSW task
    2. If the linked JSM Service Request has Request Type = "Request Access"
    3. Then set the Assignee of the JSW task = John Doe

Question: How can point #7-2 be accomplished?

 

3 answers

1 accepted

3 votes
Answer accepted
Kent G
Contributor
February 17, 2026

I was able to find the solution to this. I was going down a path more complicated than I needed. I was going down the path @Oleksii Melnyk _MOY Apps_ suggested. To go into a branch for linked issues, and set variables that I wanted to use outside of the branch -- a suggestion Rovo told me would work by the way -- but there was a problem: variables set inside the branch are empty/inaccessible outside the branch.

Because my head was going down that path, I failed to think about the much simpler "Lookup work items" action.

I ended up creating a lookup action with JQL: issue in linkedIssues("{{issue.key}}", "is the delivery ticket for")

Then I was able to set variables to values such as: {{lookupIssues.Request Type.requestType.name}} in subsequent steps.

I hate to be that guy that wasn't patient enough to find the answer before asking the question, but today I'm that guy. Maybe this will help someone else someday.

image.pngimage.png

3 votes
kent_guthrie
February 17, 2026

(Reply removed and replaced as it was posted using the wrong account)

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 Champions.
February 17, 2026

Hi @Kent G -- Welcome to the Atlassian Community!

Well done solving your own question with experimentation!  To help others find this solution faster, I recommend accepting your own answer :^)

Yes, and...I recommend caution using any AI-guesser tools for automation rule solutions, including those provided by Atlassian.  They likely cannot access your complete products, site, space, etc. configurations and data context, and so the guesses are: at best, incomplete; and at worst, could cause irreversible changes / errors to your work items.  I suspect even a very complex prompt with all site configuration data would still produce an incomplete answer.  So, buyer beware using such tools with automation rules.

 

Kind regards,
Bill

Like Susan Waldrip likes this
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 Champions.
February 17, 2026

One more thing for the rule images you just posted...

The Lookup Work Items action gathers zero-to-many work items, and the inline format of iteration you use to get the request type ID could possibly produce zero-to-many values, in a comma-separated values list.

There are two ways to manage this, depending upon whether or not you want to handle returns of more than one work item:

  • Add a smart values condition to confirm {{lookupIssues.size|0}} equals 1 before creating the variable
  • Or, only get the first item returned, ignoring any others: {{lookupIssues.first.Request Type.requestType.id}}

 

Like Susan Waldrip likes this
kent_guthrie
February 17, 2026

Feels weird to accept my own answer as "the answer" but aside from that -- how do I do it? I'm not seeing a link or button to "accept this as the answer." Perhaps it's not showing up because I'm the OP? Or could very likely be I'm just missing where it is because I seem to miss things if they're not entirely obvious!

Like Susan Waldrip likes this
Kent G
Contributor
February 17, 2026

Or it could be because somehow, the site switched me to a different account. In fact, no "could be" about it -- I don't know when or how it did it but that's exactly what it did.

Like # people like this
2 votes
Oleksii Melnyk _MOY Apps_
Community Champion
February 17, 2026

Hi @Kent G and welcome to the Atlassian Community.

First of all you need to use Branch rule / related work items with Type of related work items Linked work items

Than in this branch, you can check the work item type/request type.

Снимок экрана 2026-02-17 в 18.18.27.png

Снимок экрана 2026-02-17 в 18.17.16.png

kent_guthrie
February 17, 2026

(Reply removed and replaced, as it was posted using the wrong account)

Kent G
Contributor
February 17, 2026

@Oleksii Melnyk _MOY Apps_ Thanks for the suggestion. This is actually the direction I was originally going but the problem was -- when a variable was set inside the branch, the variable was unable to be used outside the branch.

So within the branch I could retrieve the Request Type. But once the branch ended I was unable to do the following...

If varRequestType = "Request Access" then set Assignee = "John Doe" because varRequestType was empty outside of the branch.

I did end up finding the solution, which I'll add as a reply the the main question.

Suggest an answer

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

Atlassian Community Events