- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2014 06:30 AM
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
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014 06:39 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2014 05:29 PM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2014 06:17 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2014 09:30 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014 06:39 AM
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);