Automate Insight Objects to Display In Ticket Custom Fields

Marc Blascak August 30, 2022

I apologize ahead for the novel below.

After quite of bit of research and homework, I have been able to get Jira Insight to work (mostly) the way i want.  However there is a missing piece that would complete the puzzle perfectly that i cannot find.

Background:

I have created  2 Schemas as outlined below

  1.  Asset Management
    1. Inventory - this contains the individual objects (assets) such as desktops and laptops.  with various attributes: make, model, serial, name, Assigned to, etc
  2. Employees
    1. Users - this contains a list of employees (a small sample for current testing) with attributes: Name, Jira Username, AD username, email, etc

Both schemas have objects.  and i have been successful in mapping a custom field to User using automation.  so currently, when a request is received, the reporter is looked up, matched against the Jira Username filed, and that specific user info is displayed in the ticket.  I was able to get that piece working very well.

What i would like to do next is based on the user info above, if a user is assigned a computer in the Inventory schema, i would like the computer information that matches that user to display in the ticket as well.  Seems simple on the surface, but i cannot seem to get the right combination of attribute field settings, references, custom field configuration (context and filters) and/or automation to get the information to display in the ticket.

i would be happy to provide screenshots and other data if needed.  Also, i am a JQL and IQL noob (non-dev type), so please bear that in mind as well

Any assistance or advise would be highly appreciated.  This is the last step in getting my out of date and clunky web-based asset management system impported into Jira for better tracking and use by my techs.

 

1 answer

0 votes
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2022

Hello @Marc Blascak

In your asset management schema, you'll want to have an Object reference attribute to your employee schema. For example, in my hardware object type, I have an attribute called "User" that is an object reference to the Employee object type:

Screen Shot 2022-08-30 at 2.17.24 PM.png

On my employee object type, I have a "Jira User" attribute which is basically a user field:

Screen Shot 2022-08-30 at 2.21.14 PM.png

Now, on your different pieces of hardware, etc you'll want to set that user attribute field so you know who "owns" or is "using" the inventory.

Next, you'll want to create an "Insight Objects" custom field in the Custom Fields area. In my case, I have a "My Hardware" field that will automatically limit the options in the field to just the hardware that is "owned" by the user raising a request. So if I am raising a request, if I own 1 computer, 1 monitor, and 1 keyboard, those options will appear for me, and I won't get to see the list of all the hardware that is out there in Insight. 

Here's the IQL configuration:

Screen Shot 2022-08-30 at 2.23.53 PM.png

Couple of things to note:

  • The objectTypeandChildren(<object type>) function will look for all objects in the specified object type as well as any children object types. So if I have multiple object types under hardware, those are included here as well
  • The filter issue scope is the sauce here that gives me that dynamic functionality. For objects in the Hardware object type, I only want to find the objects where the Hardware.User (Employee).Jira User (User field) matches the reporter (person logged in). This is what limits the hardware options to just the reporter. You could change the ${reporter} to something else, and depending on your specific configuration you may need to do ${reporter.displayName} or something like that, but this is what I think you'll need

Hope this helps

Marc Blascak August 30, 2022

thanks for the detailed response!!!  you have almost the exact same config and schema as i have set up.  i will test this out for sure and get back to you.

one quick thing.  we don't (at this point) have the users submit their requests with the computer info via the portal (although we will eventually get to that point).  As we have it set now, they submit a ticket via the portal, email or phone call, and when the issue is generated, that's when the custom user field and computer fields would be populated.  i created a custom screen, with a user info tab and a computer info tab (to keep the issue screens less cluttered for my techs.  Just wanted to clarify in case that makes a difference in your response as well.

i attached some screen shots to clarify my side, and show what is working and what isn't.  the first 2 are the user info custom field in the issue screen, along with the custom field config (which works perfectly), the second 2 are for the computer info custom field in the issue and its configuration, which isn't.Screenshot 2022-08-30 131104.jpgScreenshot 2022-08-30 131243.jpgScreenshot 2022-08-30 131258.jpgScreenshot 2022-08-30 131354.jpg

thank you again!

Suggest an answer

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

Atlassian Community Events