mysociety / fixmystreet

This is mySociety's popular map-based reporting platform: easy to install in new countries and regions
http://fixmystreet.org/
Other
501 stars 235 forks source link

[Bexley][WW] Fix cab logs USRN bug #4965

Closed nephila-nacrea closed 2 months ago

nephila-nacrea commented 2 months ago

We were looking up the USRN cab logs using the USRN value from the first UPRN log returned. But if there are no UPRN logs, there is no USRN value, and therefore all logs are requested. This causes bugs / timeouts.

This PR makes it so we now look up the USRN via the LLPG database, before we request any logs.

[skip changelog]

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 46.27540% with 476 lines in your changes are missing coverage. Please review.

Project coverage is 69.81%. Comparing base (399a997) to head (e30661d).

Files Patch % Lines
perllib/FixMyStreet/Roles/Cobrand/SLWP.pm 10.37% 119 Missing and 2 partials :warning:
perllib/FixMyStreet/Cobrand/Merton/Waste.pm 2.72% 107 Missing :warning:
perllib/FixMyStreet/Roles/Cobrand/Adelante.pm 7.40% 50 Missing :warning:
perllib/FixMyStreet/Cobrand/Bexley/Waste.pm 4.54% 42 Missing :warning:
web/cobrands/fixmystreet-uk-councils/assets.js 84.70% 26 Missing :warning:
perllib/FixMyStreet/Cobrand/Surrey.pm 18.18% 18 Missing :warning:
perllib/FixMyStreet/Roles/Cobrand/Echo.pm 37.03% 12 Missing and 5 partials :warning:
perllib/FixMyStreet/Cobrand/Peterborough.pm 0.00% 12 Missing and 1 partial :warning:
...lib/FixMyStreet/App/Controller/Waste/Whitespace.pm 31.25% 11 Missing :warning:
perllib/FixMyStreet/App/Controller/Waste.pm 11.11% 7 Missing and 1 partial :warning:
... and 21 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4965 +/- ## =========================================== - Coverage 82.57% 69.81% -12.76% =========================================== Files 393 399 +6 Lines 30697 31302 +605 Branches 4861 4947 +86 =========================================== - Hits 25347 21855 -3492 - Misses 3898 7958 +4060 - Partials 1452 1489 +37 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nephila-nacrea commented 2 months ago

Relevant commit moved to https://github.com/mysociety/fixmystreet/pull/4932.