TABLE Spell_Macro del description fragment last_mod_dt lock_object msg_html msg_tmpl_info ob_type sym tenant type usr_integer1 usr_integer2 usr_integer3 usr_string2 usr_string3 usr_string4 { "0", "This condition macro is intended to be used as an event condition.\\0012It picks up a workshift Symbol from the event description and returns true, if the actual tickets open_date is inside the workshift.", "//\\0012// 08/11/2021 michael.mueller@hcl.com : initial version created\\0012//\\0012\\0012string workshift_sym, schedule;\\0012\\0012workshift_sym=event_tmpl.description;\\0012if(!is_empty(workshift_sym)) schedule = expand(format(\"&{'%s'=wrkshft.sym->sched}\", workshift_sym));\\0012\\0012if(is_empty(schedule)) {\\0012 logf(ERROR, \"Unable to get schedule string from workshift '%s' ! Check value of description in event '%s'. Condition returns false !\", workshift_sym, event_tmpl.sym);\\0012 set_return_data(FALSE);\\0012 return;\\0012}\\0012\\0012logf(SIGNIFICANT, \"schedule found for '%s' : '%s'\", workshift_sym, schedule);\\0012logf(SIGNIFICANT, \"check if open_date is inside workshift :'%s\", (string)open_date);\\0012int target_date;\\0012target_date = (int) workshift_work2abs(schedule, open_date,(duration)0);\\0012if(target_date != (int)open_date) {\\0012 logf(SIGNIFICANT, \"open_date '%s' is outside workshift '%s'. Condition returns true.\",(string)open_date, workshift_sym);\\0012 set_return_data(TRUE);\\0012}\\0012else {\\0012 logf(SIGNIFICANT, \"open_date '%s' is inside workshift '%s'. Condition returns false.\",(string)open_date, workshift_sym);\\0012 set_return_data(FALSE);\\0012}\\0012", "08/11/2021 10:00:00" ,"0" ,"", "" ,"cr" ,"open_date outside workshift" ,"" ,"COND" ,"" ,"", "" ,"" ,"" ,"" }