CLC-4013 - Updated script to support AFFILIATION_PARTIAL environment variable