Related list for CI to show incidents related to a CI

Jeffce
Tera Expert

I am looking for a way to build a related list to use in the CMDB_CI that will show incidents related to that CI, I have built one but it shows every Incident in the system, any thoughts on the script?

 

JJ

1 ACCEPTED SOLUTION

Thank you so much, got it to work, had to do a little manipulation, This   worked below. The parent.sys_id showed no incidents..


Again thank you so much for both your help and responses.



current.addQuery('cmdb_ci', parent.ci);


View solution in original post

6 REPLIES 6

Crusty1
Giga Contributor

You have the "Task -> Configuration item" related list OOB


OR


If you create a new "Relationship" under System Definition it would look like this (like Incidents by same Caller):



Applies to table: Incident


Queries from table: Incident



Query with: current.addQuery('cmdb_ci', parent.cmdb_ci);


Thanks for the advice, I tried this and still get the same results i was getting before, I have the incident tab in the CMDB but shows every incident, not just the ones associated to the CI


Hey,



I just tried Crusty's answer and got the same result as you did.



Try this..



Applies to table: Configuration Item (cmdb_ci)


Queries from table: Incident



Query with: current.addQuery('cmdb_ci', parent.sys_id);




so the difference is parent.cmdb_ci changes to parent.sys_id.




Let me know!!




Worked for me!


Thank you so much, got it to work, had to do a little manipulation, This   worked below. The parent.sys_id showed no incidents..


Again thank you so much for both your help and responses.



current.addQuery('cmdb_ci', parent.ci);