In CA Service Desk Manager(CA SDM), Status filters chosen for validation fails due to macro condition with OR Operator.

book

Article ID: 35391

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service KNOWLEDGE TOOLS CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

Introduction:

Macro Conditions with 'OR' operator fails on the status filters that are chosen for validation, this functionality is corrected with 'AND' condition.

This function is syntactically correct but the code fails to satisfy the condition \ does not provide correct results.

For Example:

if
(( !is_null(getval_by_name("type")) && getval_by_name("type") == "I" ) &&
 ( !is_null(getval_by_name("priority")) && getval_by_name("priority") == 2 ) &&
(( is_null(getval_by_name("status")) || getval_by_name("status") != "ACK" ) ||
 ( is_null(getval_by_name("status")) || getval_by_name("status") != "CNCL" ) ||
 ( is_null(getval_by_name("status")) || getval_by_name("status") != "CL")))

set_return_data(TRUE);

else

set_return_data(FALSE);

 

Instructions:

Change the operator || to &&  in the code aforesaid.

For Example:

if
(( !is_null(getval_by_name("type")) && getval_by_name("type") == "I" ) &&
 ( !is_null(getval_by_name("priority")) && getval_by_name("priority") == 2 ) &&
(( is_null(getval_by_name("status")) || getval_by_name("status") != "ACK" ) &&
 ( is_null(getval_by_name("status")) || getval_by_name("status") != "CNCL" ) &&
 ( is_null(getval_by_name("status")) || getval_by_name("status") != "CL" )))

set_return_data(TRUE);

else

set_return_data(FALSE);

 

Note: This is specific to the requirement for satisfying the condition of Status to be whether Cancelled / Acknowledged / Closed and priority = 4 and Ticket type is Incident.

 

Additional information: 

CA Service Desk Versions supported - R12.x and R14.1

Environment

Release: SDMU0M99000-14.1-Service Desk Manager-Full License
Component: