How to filter users manager from user asset object

JZD
Contributor
February 10, 2025

Hi Folks 

I have some issue to add the users manager as approver in the issue the user opened. I found here some guides and be trying some hours but have no lock. My situation looks the following:

  • Object schema named: Employees
  • Object type in Employees Schema Tree named: Employees
    • Department (but not necessary in this case)
    • Role (but not necessary in this case)
  • Object attribute in user object for the Manager named: Manager Name
    • Manager Name is directly included in each users object so i have not an extra object in my employees schema tree

SCR-20250211-hoyz.png

SCR-20250211-hpum.png

 

have tried already from this guides:

Finding managers of users and setting them as approvers automatically - Web Site - Confluence

How to auto-populate approvers from Asset objects attributes using automation in Assets | Jira | Atlassian Documentation

 

My automation looks actually:

SCR-20250211-hqib.png

my workflow for the approver is in place but in this case i need to use for each request the users manager to add him as approver.

From my automation the first part til and with extracting the reporters email address is working fine. The Audit log shows each time an success but the manager (i think) is not found and not entered in the issue as approver.

 

Thank you in advance

2 answers

2 accepted

8 votes
Answer accepted
Bob Dalm
Contributor
February 11, 2025

Hi JZD, 

You'll need to fill the user picker field with the accountId of a Jira user. Looking at your screens this would be something along 

{{lookupObjects.Manager Name.Atlassian Account ID.accountId}}

As Valerie rightfully suggests, get the input values in a Log action, so you can review what happens in your rule's audit log. 

Best regards, 

Bob

JZD
Contributor
February 11, 2025

@Bob Dalm Thank you man, you are my hero :)

I was searching for this multiple hours and i have so much issues to understand how this is working.

{{lookupObjects.Manager Name.Atlassian Account ID.accountId}} is correct!!!! :)

 

Could i ask you if you can break down to me this smart value

 

or maybe i try and you can correct me if i am wrong.

  1. Starting from the automation where i am looking for the reporters email address
  2. here i am unsure, with the compare, what i am comparing? the reporter or the reporters email address for existing
  3. {{lookupObjects.Manager Name.Atlassian Account ID.accountId}}
    1. lookupObjects.Manager Name = the attribute for the reporters "Manager Name"
    2. lookupObjects.Manager Name.Atlassian Account ID = Managers Atlassian Account ID?
    3. lookupObjects.Manager Name.Atlassian Account ID.accountId = no clue what this is doing
Like Valerie Knapp likes this
Bob Dalm
Contributor
February 11, 2025
  1. Starting from the automation where i am looking for the reporters email address
    • There would be other ways to do this, but yes!
  2. here i am unsure, with the compare, what i am comparing? the reporter or the reporters email address for existing
    • In the compare you ensure there's a result (in fact, that there'is 1 result - this means the rule will fail if there's multiple users with the same email address)
  3. {{lookupObjects.Manager Name.Atlassian Account ID.accountId}}
    1. lookupObjects.Manager Name = the attribute for the reporters "Manager Name"
      • Exactly, also being an employee object. 
    2. lookupObjects.Manager Name.Atlassian Account ID = Managers Atlassian Account ID?
      • You've named the attribute that contains the Atlassian user "Atlassian Account ID". Simply refering to another attribute (of the object that's in the manager name attribute). Yes, it get's a bit confusing here :)
    3. lookupObjects.Manager Name.Atlassian Account ID.accountId = no clue what this is doing
      • so in the "Atlassian Account ID" attribute you actually have an Atlassian user. From this Atlassian user, you want to get the accountId, as this is what's expected for the user picker field as input. 

Hope this helps clarify things a little!

JZD
Contributor
February 11, 2025

Thank you for your explanation.

Could i ask you how you would solve it with the reporter email adress or how you will do this automation?
I always prefere it simple as possible for the solutions and i from my side think it should be easier as my automation.

Bob Dalm
Contributor
February 11, 2025

Should be as straightforward as a lookup on

"Atlassian Account ID" = {{reporter}} 

 

 

 

JZD
Contributor
February 11, 2025

Thank you Bob. Will try it.

Like Bob Dalm likes this
1 vote
Answer accepted
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2025

Hi @JZD , thanks for your post.

Please can you try putting a 'log' action before the 'edit issue' action and put the smart value you want to populate the edit issue action with? 

image.png

When you try to run the rule again and check in the audit log, you should be able to verify if the correct value is being 'printed' into the log and then, if it's not, then we can try to understand why.

Thanks

JZD
Contributor
February 11, 2025

@Valerie Knapp Thank you very much for your answer

I tried now with the log action but receive no output from my value except the mail address in the first step

SCR-20250211-imbx.png

Bob Dalm
Contributor
February 11, 2025

Breakup your smart value to troubleshoot, i.e. {{lookupObjects}} then {{lookupObjects.Manager}} then {{lookupObjects.Manager.Employee Name}}, but also have a look at my comment above :)

Like Valerie Knapp likes this
JZD
Contributor
February 11, 2025

Thank you Valerie also for your help. 
I am using not the log action for find other outputs i need to proceed with my automation.

 

Suggest an answer

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

Atlassian Community Events