Showing reports and categories from multiple bodies in the All reports page

17 views
Skip to first unread message

Jon Kristensen

unread,
Nov 14, 2023, 4:52:48 AM11/14/23
to FixMyStreet
Hi!

We have a national road agency body covering all Swedish municipality areas, and a national road agency category belonging to that body.

This allows us to...

  • have the road agency category show up in any area,
  • have reports in the road agency category go directly to the road agency, and
  • allow municipalities reassign problems to the road agency category and have the report being sent to the road agency automatically.

This works well, but I'm wondering if there's a way to have road agency reports, and the road agency category, be visible on All reports pages for coucils.

I'm also wondering if it's possible to make the road agency category “staff only” for specific bodies, in case a body would like to respond to road agency reports (and then manually assign all road agency reports to the road agency body).

Thanks!

All the best,
Jon

Matthew Somerville

unread,
Nov 24, 2023, 9:03:12 AM11/24/23
to FixMyStreet
Hi,

The All Reports pages work by asking for all reports sent to a particular body. In theory you could add a hook to the point at which it queries this, and then add the national road agency body there, so that its reports would be returned as well, but then that would be their reports anywhere, not limited to the council's area. You might be able to filter on `areas` I guess to work with that, but I wouldn't be exactly sure how.

On your second query, there is a categories_restriction hook called with the list of categories that have been fetched by that point. You could in theory do a check there and change the road agency category to be staff only at that point, though I'm not sure if that would be the only place it would need doing, but would certainly get you a lot of the way.

ATB,
Matthew

--
You received this message because you are subscribed to the Google Groups "FixMyStreet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fixmystreet...@mysociety.org.
To view this discussion on the web visit https://groups.google.com/a/mysociety.org/d/msgid/fixmystreet/cff70f4e-750a-4c21-951b-b1cb739acd73n%40mysociety.org.
Reply all
Reply to author
Forward
0 new messages