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

519: New milestones #131

Closed trbmcginnis closed 5 years ago

trbmcginnis commented 5 years ago

Closes #519

trbmcginnis commented 5 years ago

For these new milestones to show up in the project view, we want 1. the milestones to exist for that project (so match the milestone IDs) and 2. the project to have one or more actions that are "Study" actions and match dcp_projectaction.dcp_action = '526ede3a-dad0-e711-8125-1458d04e2f18'

In order to filter for all projects that match the criteria for these two new milestones, run this query in the database:

SELECT 
dcp_projectaction.dcp_name, 
dcp_projectaction.dcp_project, 
dcp_projectaction.dcp_action, 
dcp_projectmilestone.dcp_name,
dcp_projectmilestone.dcp_plannedstartdate,
dcp_projectmilestone.statuscode
FROM dcp_projectaction
LEFT JOIN dcp_projectmilestone
ON dcp_projectmilestone.dcp_project = dcp_projectaction.dcp_project
LEFT JOIN dcp_project
ON dcp_projectmilestone.dcp_project = dcp_project.dcp_projectid
WHERE dcp_projectaction.dcp_name LIKE '%Study%'
AND dcp_projectmilestone.statuscode <> 'Overridden'
AND 
    (dcp_projectmilestone.dcp_milestone = '483beec4-dad0-e711-8116-1458d04e2fb8' OR 
        dcp_projectmilestone.dcp_milestone = '4a3beec4-dad0-e711-8116-1458d04e2fb8')
AND dcp_project.dcp_visibility = 'General Public'
ORDER BY dcp_projectmilestone.dcp_plannedstartdate DESC
ghost commented 5 years ago

Looks good, but wondering about this first bullet in your original PR description:

updates selection of milestones that are included in project view from milestone name to milestone ID in show.sql

what does that mean? confused b/c I dont see anything in your diff that changes a reference to milestone name to refer to milestone ID

EDIT: JK IM BLIND ALL GOOD