def get_task_id_from_name(task_name, project_tasks):
    """
    get task_id from task_name
    """
    result = None
    if project_tasks is not None:
        for task in project_tasks:
            if task["name"] == task_name:
                result = task["id"]
    if result is None:
        raise RuntimeError("Task %s not found." % (task_name))
    return result