def get_button_id_from_name(button_name):
    """ Convert a button name to the its id """
    parts = button_name.lower().split(' - ')
    task = parts[0]
    suffix = ''

    if len(parts) > 1:
        resource_type = parts[1]
        suffix = '-' + parts[1][0]

    return task + '-btn' + suffix