Hi, it should be something like this
OBJECT chg {
TRIGGERS {
POST_VALIDATE zpropogate() 3001 FILTER ( (summary{} || description{} || status{}) );
};
};
chg::zpropogate(...)
{
string wc;
object c_dob, c_list, group_leader, attached_events_table_record;
int c_count, i;
uuid login_userid;
wc = format("parent = %d", id);
send_wait(0, top_object(), "call_attr", "chg", "current_user_id");
login_userid = msg[0];
send_wait(0, top_object(), "call_attr", "chg", "sync_fetch", "MLIST_STATIC", wc, -1,0);
c_count = msg[1];
c_list = msg[0];
if (c_count > 0) {
for(i=0;i< c_count;i++) {
send_wait(0, c_list, "dob_by_index", "DEFAULT", i, i);
c_dob = msg[0];
send_wait(0, c_dob, "call_attr", "description", "set_val", description, "SURE_SET");
if ( msg_error() ) {
logf(ERROR, "Propogating: %s, ticket %s", msg[0], c_dob.chg_ref_num);
}
}
}
Of course you need to tune it to your requirements, but it is just to give you an idea