def normalize_sequential_dates(issue_list):
    """Adjust issue status dates based on latest state.

    issue_list must contain a contiguous set of items that represent dates.
    None is an exceptable date in this situation. These dates must start with
    created_at and finish with closed_at. This function searches issue_list for
    the dates and then modifies them such that older dates always preceed
    newer dates when viewed from created_at to closed_at.
    """
    start, finish = ('created_at', 'closed_at')
    date_fields = []
    for field in issue_list:
        if field == start:
            date_fields.append(field)
            continue
        elif not date_fields:
            continue
        else:
            date_fields.append(field)
        if field == finish:
            break

    number_of_dates = len(date_fields) - 1
    # We need to work backwards
    i = 0
    while i < number_of_dates:
        date = issue_list[date_fields[i]]
        filtered_dates = filter(None,
                                (issue_list[f] for f in date_fields[i + 1:]))
        if not filtered_dates:
            # If everything after this date is None, there's no need to keep
            # looping
            break
        next_earliest_date = min(filtered_dates)
        if date is not None and date > next_earliest_date:
            issue_list[date_fields[i]] = next_earliest_date
        i += 1

    return issue_list