Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,082
Community Members
 
Community Events
176
Community Groups

Filtering assets based on customer organization

Hi,

I've started to test Insight - Asset Management, and I've got a question about filtering assets on the customer portal.

I've got the following scenario.
There are multiple organizations with multiple (different) users inside each organization. Each organization is actually our end customer and each organization has different products/assets at their location.

So, we could say that actually one organization = one location.

What I would like to get is that once a user opens a request in the portal and would like to select an asset/product with which they have a problem, only products linked to the users' organizations are displayed within the Insight custom field type.

Is something like this possible with IQL and/or JQL?

Cheers,
Tomislav

2 answers

2 accepted

3 votes
Answer accepted
Mark Segall Community Leader Mar 22, 2022

Hi @Tomislav Tobijas - Unfortunately, there is no way to query against organization on the create screen because that isn't officially captured until the request is submitted.  So, you need to be able to filter against the user.  The only way that I've found to make this work is by replicating your org/customer structure in Insight.  From there, you can provide a user-specific experience by leveraging ${reporter} and Filter Issue Scope with appropriate inbound/outbound references from there.

For example...

  • Object Type 1 - Organizations
  • Object Type 2 - Customers
    • Attribute - jiraID to capture the user ID of each customer
    • Attribute - Reference Organizations
  • Object Type 3 - Data I want to present to the reporter
    • Attribute - Reference Organizations

On the Insight Field setup, you would set it up like this:

  • Filter Scope (IQL): objectType = Object Type 3
  • Filter Issue Scope (IQL): object HAVING outboundReferences(object HAVING inboundReferences("jiraID" = ${reporter.id}))

Hope this helps.

Hi @Mark Segall

Thanks for the quick reply. I think I get it.
Will try it out in the upcoming days.

If I got everything, this would mean that I would need to replicate all Organizations and Users to Insight, which might be a pain if we would about to do it manually?

Also, if the customer account was to be deactivated or removed from JSM, we would need to do the same in Insight? If that's the case, I think that would be way too much manual work as we're trying to automatize everything, especially user provisioning.

Mark Segall Community Leader Mar 22, 2022

replicate all Organizations and Users to Insight, which might be a pain if we would about to do it manually?

Completely agree about doing so manually.  I'm working on a similar scenario now and my plan is to try and set up a scheduled automation rule leveraging the Send Web Request action to hit the JSM API and pull the orgs/customers on a schedule.  

Also, if the customer account was to be deactivated or removed from JSM, we would need to do the same in Insight?

Yes, but I'm hopeful with the API call, I can get inactive users and either delete from Insight or mark as inactive and adjust my filter queries accordingly.  

This one is still a work in progress, but potential is there.

Like # people like this

I just realized that, technically, I wouldn't need to 'copy' organizations from JSM to Insight, but the products/objects would need to be referenced to a specific organization in Insight - so the Insight structure would be necessary, while JSM one is not. At least when looking at customer accounts and organizations they are in.

Anyhow, I've tested what you have suggested @Mark Segall and it works like a charm!

Thanks!

Mark Segall Community Leader Mar 23, 2022

Happy it worked out for you.  And correct the JSM organization is intended for one purpose... Enabling users with the same affiliation access to each other's requests.  If you want to be able to perform any CRM type activities, that's where Insight comes into play.

1 vote
Answer accepted

Hey,

My colleagues and I just found a bit easier solution for this. The basic concept stays the same, but without the need of having to replicate Customer structure in Insight - only Organization structure is enough.

So, I'll take what Mark wrote earlier and just modify the steps a bit:

  • Object Type 1 - Organizations
    • Attribute - "Customer" (attribute type: User)
  • Object Type 2 - Data I want to present to the reporter
    • Attribute - "Assigned organization" (Reference Organizations) - it is important to use the same attribute name (for referencing organization) on each object type

Now, for the attribute "Customer" value in each Organization object, you can select any Atlassian or Customer account that you have on your site.

2022-07-21_09-16-20.png

On the Insight Field setup, you would set it up like this:

  • Filter Scope (IQL): objectType in ("ObjectType1", "ObjectType3") - replace strings with actual object type names (e.g. "Drones")
  • Filter Issue Scope (IQL): "Assigned organization".Customer=${reporter}

Filter issue scope depends on what attribute name(s) you used before (see list items/bullets above).

Hope this might be helpful to someone in the future.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events