
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2019 01:54 AM
Hi all,
I was wondering whether this was possible - I'd like to be able see how many related problem tasks there to each problem (like the related incidents field in Problem) I've created a database view that links problem ID to problem task but the trouble with that is that it doesn't show which problems have no tasks attached.
Any help or advice on this is very welcome and appreciated as always!
Thanks
Rich
Solved! Go to Solution.
- Labels:
-
Problem Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2019 02:08 AM
Hello,
You could query this from your report designer.
Select your Table as Problem And add a Related List condition that says Problem Task-> Problem is Greater Than or Equal to 0
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2019 02:12 AM
You can also write Background-script to check problems with no problem task. Try below code in BG script
var arr ;
var gr1 = new GlideRecord("problem_task");
gr1.query();
while (gr1.next()) {
arr = gr1.problem+","+arr;
}
var gr = new GlideRecord("problem");
gr.addEncodedQuery('sys_idNOT IN'+arr);
gr.query();
while (gr.next()) {
gs.info(gr.number);
}