rssidlowski / Pollution_Source_Tracking

City of Baltimore Pollution Source Tracking
0 stars 0 forks source link

PST Report: PST Sheets #196

Open rssidlowski opened 8 years ago

rssidlowski commented 8 years ago

When running the PST report PST Sheets and entering a date range, all the samples are included not ones in the date range. What is the date range compared against? I suspect it is the investigation's complaint date. Not that if the from date/to date is filled in and the common name is as well, get the name even if not in date range? See sample below: pstsheetdate

How much effort would it be to filter the report by dates of the samples within the named investigation?

gerrykelly commented 8 years ago

This report design and functionallity came from issue #15. It was never really specced out to work how it seems like they anticipate it should. So to revise this I need requirements that really spell it out.
What you are seeing now is because: 1) The date range is applied to investigation complaint date 2) If an investigation name is selected it takes precedence over dates (and watershed) since if you have the name no other investigation-based criteria here makes sense (with current operation I would think the report parameter selection UI should disable date and watershed when name is used, or if you want to be more helpful to the user the UI could filter the choices for name by what is in date and watershed, but when you run the report you only get the one investigation if you selected a name) 3) All samples for an investigation are returned in the report.

But if the intent is to limit a date range for samples themselves, I modified the report it dev so that the samples subreport for an investigation gets its data from a new stored procedure that limits samples by sample date using the date range.
For a test case to see where this is going you can look at the reports for investigation “Pimlico Elementary Middle School” (ID=934). This investigation has samples for 4/25/2014 & 5/8/2014. I’m not sure that it behaves as expected when calling the report from the UI (but please test comparable to the URLs below):

http://dpwdev.baltimorecity.gov/SDUO/rptPSTtrack.aspx?name=934&date1=4/2/2014&date2=5/1/2014

http://dpwdev.baltimorecity.gov/SDUO/rptPSTtrack.aspx?name=934&date1=4/26/2014&date2=5/9/2014

When you enter these URLs directly you should see that you only get the samples within the date range. So some version of this approach could resolve what was observed as unwanted records for that noted Lexington St sample, but the overall and specific functionally would still need to be fleshed out.

rssidlowski commented 8 years ago

Current PST Sheet: Please change the UI to disable the watershed filter if user enters common name. (as you stated above).

I am verifying the requested functionality with the City PST folks.