Insight attribute auto populate from a linked object
Asked by Phil Patrick:

Hello All, I'm extremely new to Insight and have hit a stumbling block with auto populating attributes.

In the insight object schema "Assets", I have two objects: Computer and Department.

On the Computer object, I have an attribute linking the department object and another text attribute called Manager. On the department object there is also an attribute called Manager.

When selecting a department on a computer object, I want to auto populate the Manager attribute on Computer with the value from the Manager attribute in the linked department. And when ever the department is changed, it needs to auto update the Manager attribute with the new value

I've searched around the community but can't quite find what I'm looking for. Any help would be greatly appreciated.

Thanks in advance


Answers:
author: Martin Bayer _MoroSystems_ s_r_o__
body: Hi [@Phil Patrick](/t5/user/viewprofilepage/user-id/4694511) welcome on the community :)

You need to use global automation rule to achieve this. I just tested it and following rules work for me:

![Screen Shot 2022-01-27 at 22.54.43.png](https://community.atlassian.com/t5/image/serverpage/image-id/180396i224C1C52A0900E6B/image-size/large?v=v2&px=999 "Screen Shot 2022-01-27 at 22.54.43.png")![Screen Shot 2022-01-27 at 22.55.00.png](https://community.atlassian.com/t5/image/serverpage/image-id/180397i871997D01B69E2EF/image-size/large?v=v2&px=999 "Screen Shot 2022-01-27 at 22.55.00.png")

Let me know if you need more help :)

comments: author: Phil Patrick
body: Thanks so much for the reply, although I have some differences in my options available. For a start, I don't have the "Global Automation" in the menu on the left like you do, I simply have Automation Rules and then an option to select Global Rules and create a new one:

![image001.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/180453i1C248A24E0E732AC/image-size/large?v=v2&px=999 "image001.jpg")

Then when I create a new rule, I don't have the "Object updated" trigger, they all seem to be issue related as opposed to Insight objects:

![image002.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/180454i48C9A89928931ECE/image-size/large?v=v2&px=999 "image002.jpg")![image003.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/180455iA0628503CCC7F49E/image-size/large?v=v2&px=999 "image003.jpg")

So I tried to use your suggestion withing the insight object schema automation:

![image004.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/180456i0C68B2D969962DDD/image-size/large?v=v2&px=999 "image004.jpg")

But this doesn't work. Thanks again for taking the time to reply


author: Martin Bayer _MoroSystems_ s_r_o__
body: Hi [@Phil Patrick](/t5/user/viewprofilepage/user-id/4694511) what version of Cloud do you use? Are you on Premium plan and do you have Jira Service Management installed?


author: Phil Patrick
body: Ah, OK I think that clears up why our options are different. Wasn't aware there was such a difference between cloud and data centre. I'm using JIRA Software 8.13.15 with Service Desk 4.13.6


author: Martin Bayer _MoroSystems_ s_r_o__
body: Ok, so you have other possibility here. Unfortunatelly I don't have similar environmet to test it. I just briefly checked the documentation: <https://confluence.atlassian.com/servicemanagementserver/configuring-automation-rules-1044784502.html>

And in worst cases you can use Groovy scripts to perform the update operation on your "linked" object (search for "Execute Groovy script").

Let me know if it helped...


author: Phil Patrick
body: Thanks Martin. I think my issue with the insight automation is that I can't help smart values, unless I'm getting the syntax completely wrong.

I've managed to input hard coded text values, but when ever I enter a smart value it just populates the field with the text of the smart value not actually the value I want.

Will focus on groovy script for now, thanks again for your help


Tags: cloud

insight