Can anyone help me what this reference qualifier means for CI.

rahul16
Giga Guru

find_real_file.png

 

javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

can anyone help me what this reference qualifier means.

1 ACCEPTED SOLUTION

Yousaf
Giga Sage

Hi,

Following checks, if the table current name is incident or problem

['incident', 'problem'].indexOf(current.sys_class_name + '') == -1?

 

If the above condition is true, it queries all the CIs with operation status = OpsStatusFilter('cmdb_ci').by('CreateTask').join()

OpsStatusFilter is a script include and by is a function inside it. This function will return a list of operational status of cmdb_ci table.

Reference : CI Reference Qualifier on Incident Form

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

View solution in original post

5 REPLIES 5

Yousaf
Giga Sage

Hi,

Following checks, if the table current name is incident or problem

['incident', 'problem'].indexOf(current.sys_class_name + '') == -1?

 

If the above condition is true, it queries all the CIs with operation status = OpsStatusFilter('cmdb_ci').by('CreateTask').join()

OpsStatusFilter is a script include and by is a function inside it. This function will return a list of operational status of cmdb_ci table.

Reference : CI Reference Qualifier on Incident Form

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

can we create reference qualifier without using OpsStatusFilter('cmdb_ci').by('CreateTask').join()

I guess not. I am not sure about that though. 

How to configure the "Configuration item" / "Affected CI" dictionary


***Mark Correct or Helpful if it helps.***

How to print the value of OpsStatusFilter('cmdb_ci').by('CreateTask').join() in background script

var data =new OpsStatusFilter('cmdb_ci').by('CreateTask').join();

gs.info(data);

 

I used this and get the answer as 6.