State to appeal parts of ruling on affordable housing