An eight-year legal battle over whether community preferences for low-cost housing violate housing discrimination law has been cleared for trial.