If you want the RITM to not change State to In Progress if one of its tasks is Pending, then a script like this should do that:

(function executeRule(current, previous /*null when async*/) {
	gs.addInfoMessage("current task state = " + current.state);
	var gr = new GlideRecord('sc_req_item');
	if (gr.get(current.request_item)) {
		if (current.state == -5) { //Pending
			gr.state = -5; //Pending
		} else {
            var sctask = new GlideRecord('sc_task');
            sctask.addQuery('request_item', current.request_item);
            sctask.addQuery('state', -5);
            sctask.query();
            if (!sctask.next()) {
			    gr.state = 2; //In Progress
            }
		}
		gr.update();
		gs.addInfoMessage("the RITM set state is " + gr.state);
	}
})(current, previous);