State, union brace for legal fallout from police ticket scan