Set up asset reference on same object type

Benjamin W_
Contributor
January 2, 2024

Hi folks

we have the following set up:

  • our users are grouped into multiple Active Directory domains
  • for each domain, we have an import into asset into one object schema (so one object scheme with multiple objecttypes)
  • each user has two attributes
    • DN = Active Directory distinguished Name of the account itself
    • ManagerDN = Active Directory distinguished Name of the account of the manager
  • the ManagerDN of one user references to the DN of another user

What we want to achieve:

  • this reference shall be displayed on the user object, so we can make use of it for approval workflows
  • so far I have only seen ways how to reference one object to another object type (e.g. to Jira user objects), but not within the same object type.

Question:

  • is it possible to make references based on a specific attribute within the same object type?
  • or is it necessary to have an object type with unique managerDNs in order to make the reference against this object type?

 

image.png

Thanks for your help on this.

Regards, Benjamin

1 answer

1 accepted

0 votes
Answer accepted
Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2024

Hi @Benjamin W_

In Atlassian Assets, object references are typically designed to link different object types. However, there are ways to approach this:

  1. Using Automation or Scripting: Custom scripts or automation rules could read the ManagerDN attribute and then find and link the corresponding user object with the same DN. This approach might require additional scripting or API usage.

  2. Creating a Separate Object Type for Managers: As you suggested, another approach is to create a separate object type for managers. This way, you can easily reference managers in the user objects. Though this might seem redundant, it simplifies the reference process since Assets is designed to handle references between different object types more straightforwardly.

Please remember to accept this answer in case it helps you resolve your question as it may also help other community members in the future.

Regards,
Eugenio

Benjamin W_
Contributor
January 21, 2024

Hi @Eugenio Onofre 

thanks for your feedback and confirmation for our assumption.
We want to follow the second approach with an additional Object Type.
But unfortunately we are not able to set it up correctly.
Maybe you can give me a hint why it is failing?

So far we have:

  1. set up a new Object Type "AD Manager"
  2. set up new import from LDAP AD "AD Global Catalog" into Object Type "AD Manager"
  3. define import attribute distinguishedName as Asset attribute distinguishedName
  4. import users successfully, distinguishedName is filled correctly (e.g. CN=John Doe,OU=Users,OU=Company,DC=ACME,DC=net)
  5. on existing Object Type "AD User" add new attribute "AD Manager" of type "Object" and Type Value "AD Manager"
  6. within the Object Type Mapping for "AD User" add new Data locator "manager" on Assets Attribute "AD Manager" and Object mapping
    objectType="AD Manager" AND "distinguishedName" IN (${manager${0}})
  7. synch both AD Manager and AD User.
  8. field "AD Manager" does not show up. Server-Log does not show anything.

I checked out the documentation https://support.atlassian.com/jira-service-management-cloud/docs/add-a-reference/ and for the syntax of AQL here https://support.atlassian.com/jira-service-management-cloud/docs/use-assets-query-language-aql/, but unfortunately seems I yet do not fully understand the principle on the references.
A former colleague successfully added a reference from "AD User" to the Jira users with this same syntax. So I am wondering what I am missing.

In fact - field manager from "AD User" maps field distinguishedName from "AD Manager". Actually, simple :-)

User:

AD-User.png

Manager:

AD-Manager.png

 

Do you know how I can make further steps to get my requirement done? Is there any documentation in this AQL in regards to references?

Thank you very much.

Best regards,
Benjamin

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2024

Hi @Benjamin W_

Sure. Please see below the AQL documentation:
https://support.atlassian.com/jira-service-management-cloud/docs/use-assets-query-language-aql/

You can look for Reference functions in the doc.

Please remember to accept this answer in case it helps you resolve your question as it may also help other community members in the future.

Regards,
Eugenio

Benjamin W_
Contributor
February 14, 2024

Hello @Eugenio Onofre 

thank you for the details. 

I was playing around a bit, but unfortunately so far I have not get it working. In the meantime, our project where we need this scenario has been postponed to whenever.. so we also paused working on this. As soon it gets relevant I will share our results here with the Community.

Regards, Benjamin

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.12.0
TAGS
AUG Leaders

Atlassian Community Events