(case, now)
return (
        usercase is not None
        and case.domain == usercase.domain
        and usercase.closed
    )
Is this an open checkin case where the associated usercase has been closed?
Is this an open checkin case where the associated usercase has been closed?
Is this an open checkin case where the associated usercase has been closed?
def associated_usercase_closed(case, now):
    """
    Is this an open checkin case where the associated usercase has been closed?
    """
    if case.closed or case.type != "checkin":
        return False

    usercase = get_usercase_from_checkin(case)
    return (
        usercase is not None
        and case.domain == usercase.domain
        and usercase.closed
    )
def associated_usercase_closed ( case , now ) : if case . closed or case . type != "checkin" : return False usercase = get_usercase_from_checkin ( case ) return ( usercase is not None and case . domain == usercase . domain and usercase . closed )