Forums

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

Import Asset 'owner' as JSM 'identity' during import using the e-mail

Elena Jakubiak June 28, 2023

On this page, the instructions read "If you are importing Jira users or groups into Assets, you must identify the users or groups by their IDs, not their Name(s)."

This is cumbersome as we'd need to go a massive join to get e-mails and IDs into the import csv. Is there a way to use AQL on the import to find users by their e-mails? 


1 answer

0 votes
Evgenii
Community Champion
June 28, 2023

Hi, @Elena Jakubiak 

When you're configuring mapping, in import, you can use such AQL, to find matching user:

Email = ${email}

In my similar import it's made so:

image.png

Elena Jakubiak June 28, 2023

Is employee a custom object you created or a proper "JIRA Identity"? 

Elena Jakubiak June 28, 2023

Screenshot 2023-06-28 at 2.29.49 PM.png

I think the issue is that I can't seem to get AQL correct for the "User" class

Screenshot 2023-06-28 at 2.30.47 PM.png

Evgenii
Community Champion
June 28, 2023

It's custom object. Looked for exact match, with Jira user.
For Jira User as label I use email, so it's enough to use such mapping
image.png

Evgenii
Community Champion
June 28, 2023

"Account Name" it's my attribute, not yours, it's example. Show please attributes of category, where you import Jira User objects

Elena Jakubiak June 28, 2023

I agree it should work, but I cannot get JSM Assets to find the attribute 'email' or any variant of it. 

This AQL Works
Screenshot 2023-06-28 at 2.34.53 PM.png


This AQL Does not work
Screenshot 2023-06-28 at 2.36.50 PM.pngScreenshot 2023-06-28 at 2.37.24 PM.png

 

So to import to a JIRA user I need to either
1. Find a field on which I can set AQL
2. Find some "base" object (like the equivalent to $)

Evgenii
Community Champion
June 28, 2023

"Owner.email" won't work, try Owner.email without quotes, or "Owner".email

So, for mapping you can use next AQL

email = ${email}

Elena Jakubiak June 28, 2023

The quotes are added by JSM

Screenshot 2023-06-28 at 2.47.01 PM.pngScreenshot 2023-06-28 at 2.46.48 PM.png

Evgenii
Community Champion
June 28, 2023

@Elena Jakubiak , we need to clarify, what atrributes has object type Owner. Can you show it?

Elena Jakubiak June 28, 2023

The object I am trying to import has this schema. Owner is a field in the object schema . Owner is of type "User" which is a JIRA built in (it is all the users of JIRA at our office). I cannot find the attributes for "User" which will work in AQL. 

Screenshot 2023-06-28 at 2.54.03 PM.png

Evgenii
Community Champion
June 28, 2023

Ok, got it.

Have to check import of users in Cloud. Slightly confused.

Elena Jakubiak June 28, 2023

All the JIRA users already exist so I don't want to make them all again. I can link my objects to the existing JIRA users if I import the user ID instead of user e-mail, as it says in the instructions. I am just asking isn't there a way to use AQL to link via e-mail. If anything, I would just end up add user IDs to our imports. 

Elena Jakubiak June 28, 2023

At this point, I'm thinking that user ID is in one table, and the associated information (e-mail, name, ...) is elsewhere which is why I can't query in AQL on User attributes. 

Evgenii
Community Champion
June 28, 2023

One last try - you can use mapping in import, without attributes. Just like on your screenshot, where you used query: "Owner" = "ejakubiak@irobot.com"

Elena Jakubiak June 28, 2023

Yep, tried that. Can't get it to work. 

Suggest an answer

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

Atlassian Community Events