NYCPlanning / deprecated-labs-zap-api

Deprecated version of the ZAP API, see https://github.com/NYCPlanning/labs-zap-api
Other
5 stars 3 forks source link

Order milestones by sequence then dates #100

Closed andycochran closed 5 years ago

andycochran commented 5 years ago

Since the sequence of milestones is explicitly set in the CRM, and the dates can be [anything], it's common for milestones of the same sequence to be out of order.

Currently, milestones are only ordered by dcp_milestonesequence:

https://github.com/NYCPlanning/labs-zap-api/blob/dd0e0c70034cd997d7a01983ef2d4e08fe6d9e5a/queries/projects/show.sql#L160

We should be able to additionally sort those groups of matching sequence into the right order using dcp_actualstartdate. I think this is as simple as changing that one line to… 

ORDER BY mm.dcp_milestonesequence ASC, mm.dcp_actualstartdate
SomeCityBureaucrat commented 5 years ago

This came to us via an issue (https://github.com/NYCPlanning/dcp-zap-data-feedback/issues/153) submitted by Aline in the Brooklyn office. Thanks all.

ghost commented 5 years ago

@hannahkates @andycochran didn't yall do this in your other change? if so, should close :)

hannahkates commented 5 years ago

Closing, this has been implemented.