mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
389 stars 195 forks source link

Batch embargoes cannot be extended once expired #5353

Open garethrees opened 5 years ago

garethrees commented 5 years ago

While there's some contention around this (https://github.com/mysociety/alaveteli-professional/issues/578), currently this isn't working as expected.

Batch 451 has expired, and as of https://github.com/mysociety/alaveteli/pull/5248 that means clearing InfoRequestBatch#embargo_duration.

However, we use InfoRequestBatch#embargo_duration (added in https://github.com/mysociety/alaveteli/commit/fae74df253d75fce47dfe7c6570a73b29c4fb4cd) to check whether to render the form to change embargoes.

This leaves an expired batch (and individual requests in that batch) in a state where you can't update the embargo once its expired.

Individual requests are not affected.

To do this manually:

batch = InfoRequestBatch.find(BATCH_ID)

batch.update(embargo_duration: '12_months')

batch.info_requests.each do |info_request|
  info_request.create_embargo!(embargo_duration: '12_months')
end
garethrees commented 5 years ago

Bit more history around checking presence of InfoRequestBatch#embargo_duration:

garethrees commented 5 years ago

Actually this is a known issue https://github.com/mysociety/alaveteli-professional/issues/447.

garethrees commented 5 years ago

Closing as a duplicate of https://github.com/mysociety/alaveteli-professional/issues/447.

garethrees commented 2 years ago

Reopening public issue in favour of https://github.com/mysociety/alaveteli-professional/issues/447.

garethrees commented 2 years ago

Mechanics should be the same as https://github.com/mysociety/alaveteli-professional/issues/578.