Problems and Problem Tasks

Richard Thomas2
Tera Contributor

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

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

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

find_real_file.png

Thanks!

View solution in original post

5 REPLIES 5

Shweta KHAJAPUR
Tera Guru

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);
   
}