Customising delay calculations

4 views
Skip to first unread message

Laurent Savaëte

unread,
Aug 1, 2023, 5:34:34 AM8/1/23
to Alaveteli Dev

Hi all,

I'm looking for guidance on customising the calculation of the delay a public body has to respond to a request.

In France, the delay isn't actually calculated as "X days after the request was made". It's a much more convoluted logic, which is summarised as "one month", but depends on a variety of factors (eg: February is shorter than March, but also the time of day at which the request was sent, bank holidays do not count, etc...). I see a `InfoRequest.calculate_date_response_required_by` method in the code, is it enough to override it, or are there other places where I need to modify code?

The `very_overdue` concept does not really apply here, so we've just set it to 100 years. I am not worried about this part.

Thanks!

Laurent for Ma Dada

Graeme Porteous

unread,
Aug 2, 2023, 3:01:07 AM8/2/23
to alavet...@googlegroups.com
Hi Laurent,

Yes customising `InfoRequest.calculate_date_response_required_by` should be all you need, internally this uses the late calculator which WDTK customises for UK schools [1] who are given extra time to respond to requests. If you are ignoring bank holidays then you'll want to customise `InfoRequest.calculate_date_response_required_by` instead of the late calculator.

Once calculated, this date is cached on each instance as `InfoRequest#date_response_required_by` and any other places in the code which used the date already looks there rather than calculating the date again.

Best,


--
Graeme Porteous
gra...@mysociety.org


--
You received this message because you are subscribed to the Google Groups "Alaveteli Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/a03c26b6-4d73-8746-e8c7-7045b05729e8%40gmail.com.

Laurent Savaëte

unread,
Aug 2, 2023, 7:57:45 AM8/2/23
to alavet...@googlegroups.com

Perfect, thanks for your quick feedback!

Reply all
Reply to author
Forward
0 new messages