-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reports: Additional logic for when to show a report #477
Comments
@shrayshray I assumed we'd be able to get at this via the matter history, but I'm not seeing any histories associated with that matter: https://webapi.legistar.com/v1/metro/matters/3746/histories Is the minutes history a different thing? If so, how do we get at it via the API? |
Thanks, @shrayshray! Looks like that bill is appearing, as expected. Meanwhile, I deployed revised display logic to the staging site! Here's an example of a bill that has associated history but doesn't appear on a published agenda (i.e., criterion 3) shown with the revised logic on staging (https://lametro-upgrade.datamade.us/board-report/2019-0388/) but not with the original logic on the live site (https://boardagendas.metro.net/board-report/2019-0388/). Doesn't look like we have any board reports with the Overall, do the visible bills on staging look ok to you? If so, I can deploy this change. |
The example I linked above looks weird! Holding on this for further guidance. |
@hancush could you remind me - what addition guidance are you waiting on from Metro for this? |
@shrayshray I don't remember specifically, only that the change in logic revealed some "strange looking board reports" (didn't do myself any favors with that one, haha) that you weren't sure you wanted to display. Perhaps I was referring to "a bill that has associated history but doesn't appear on a published agenda"? |
Another report which has minutes history but did not appear on an agenda (it was a motion made during a meeting and added to Legistar after the meeting. We do want it to show on the site) - 2020-0745. It's showing on InSite: https://metro.legistar.com/LegislationDetail.aspx?ID=4676674&GUID=2655B012-441B-4549-BD42-040307D50F4B&Options=ID|Text|&Search=2020-0745 |
Hi, @shrayshray, the logic to show these kinds of board reports was drafted in #617, but we held off on deploying because there were some board reports that met the conditions that you didn't want to show. (I have a very fuzzy memory that some draft or test board reports became visible with the revised logic, but I don't have a specific link.) Are there any additional attributes of 2020-0745 that we could add to the filter to reduce the likelihood of exposing a board report preliminarily? |
@hancush one additional criteria for the scenario we're trying to accommodate would be board report type="Motion / Motion Response" |
@fatima3558 This issue is mostly done over in #617. We want to update this filter, specifically the condition to return a report if it has a minutes history, to only return reports with a minutes history if they are of the classification "Motion / Motion Response". One important note: The OCD bill has a Related links: |
@shrayshray This is live on the staging site. See Want to take a look around the staging site and confirm the bills you expect to be live on the staging site, are? |
Yay, we're live! This one's all @fatima3558, I'm just the coach. :-) |
I will look to see what criteria is to enter test board reports and coordinate a time to test board correspondence entry with @shrayshray. |
@shrayshray We don't have logic to expose test bills on staging but hide them on production, the way we do with events. We could add it, if it's very important not to expose test bills on the live site. Otherwise, we could coordinate a time to test and remove the test bills to limit the time they are live on the site. What do you think? And if we add that logic, what would be a good condition to test for? (For events, we look for a location name of |
@hancush I think we could just coordinate a time to test and remove - either Wednesday 1/13, Thursday 1/14, or after this months meetings - between 2/1 to 2/11. Let me know when is a good date/time time for you.
|
Hi, @shrayshray, I'm generally available today. I'll be away from my computer for lunch from noon to 1 p.m. Central, and sign off at 4 p.m. Central, but any other time would work. Your test bills should come in no more than 15 minutes after you add them to Legistar. Let me know if there are any issues, or otherwise, when you've completed your test so I can go in and remove. |
@hancush great - I'll get started on this after your lunch break at 1pm Central and update the issue with the matter IDs once they're created. |
@hancush these have all been created:
|
Update - File ID: 2020-0898 / MatterID: 7340 is showing on metro.legistar.com, the others are not. 2020-0898 is the only one we want to show. |
Ok, this is going to sound wacky, but I think our logic is working. 2020-0898 was imported into the database, and navigating to https://boardagendas.metro.net/board-report/2020-0898/ throws an internal server error. In our log for that error, we can see that the site is trying to render the page. We are seeing a similar error when trying to add the bill to the search index, which explains why it is not appearing in search results. The error has to do with how we create a friendly name for the bill. Specifically, we try to combine the file number with the subject from the board report full text, however no subject is returned when the subject is I've gone ahead and made a blunt fix for this and deployed it to the staging site, so you can see that the display logic is allowing that board report to come through: https://lametro-upgrade.datamade.us/board-report/2020-0898/ Conversely, the remaining files resolve to page not found messages, which is the expected behavior for private board reports: |
@hancush doh! That just happened to be the only one of the 4 on which I neglected to replace the bracket text from the template. If I go back in and add a subject, would that confirm your hypothesis? Or should I create a brand new test report with the same attributes but also with a subject? |
Haha! Life tends to be that way, eh, @shrayshray? Can you create a new test report with a subject? I would guess that updating the subject would toggle the last modified timestamp in Legistar and trigger a rescrape but I'm not certain – a new report would remove any doubt. |
@hancush okay, new file info: |
update - it's showing on metro.legistar.com |
Nice, thank you! Next scrape slated for 20 past the hour. |
@hancush woohoo! I'll go ahead and remove the agenda dates, switch the status to draft, and change the in control body to "TO BE REMOVED" on all 5 test reports. |
Awesome, all test bills are now private / removed from the site. |
Perfect - thank you, @hancush! |
In #345 , we established logic for determining whether to show a report on the site. A new step should be added to account for Motions which are made during a meeting, rather than submitted in advance and included on the published Agenda. Steps 1 and 4 below are already in place. Step 2 should be revised as noted below. Step 3 should be added.
Check whether "Not Viewable via InSite" is True or False. If True, do not scrape it. Handled by: Skip bills with restricted view opencivicdata/scrapers-us-municipal#251
Check bill_type - always display "Board Correspondence" (was previously entered as ""Board Box") - this is the "local_classification" in the extras field or bill_type in the Bill model
3. Check whether it has Minutes History - Display if it does.
An example of a report which should display on the site, but isn't right now because it was submitted during a meeting and not published on an Agenda: 2016-0950
The text was updated successfully, but these errors were encountered: