This would do that...

function change_request) {
	return new global.GlideQuery('task_ci')
	.getBy({
		'task': change_request,
		'ci_item.operational_status': 6
	}).isEmpty();
},

This also returns true if no task_ci record is found for that change_request, if that is not the desired behaviour it will need a tweak.