def extract_reason(openfield):
    """
    Extract optional reason data from openfield.

    :param openfield: str
    :return: str
    """
    if "," in openfield:
        # Only allow for 1 extra param at a time. No need for more now, but beware if we add!
        parts = openfield.split(",")
        parts.pop(0)
        for extra in parts:
            key, value = extra.split("=")
            if key == "reason":
                return value
    return ""