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