alaveteli icon indicating copy to clipboard operation
alaveteli copied to clipboard

Record prominence reason on the event when editing through "Edit metadata"

Open garethrees opened this issue 3 years ago • 4 comments

During the first manual transparency report we tried to tally the reasons which requests were hidden. In doing so we noticed that when requests have their prominence changed through the "Edit metadata" form no :reason param is recorded in the InfoRequestEvent. See https://github.com/mysociety/whatdotheyknow-theme/issues/922#issuecomment-980061066.

~To create a better audit trail when editing prominence in this way we could check whether the :prominence attribute was changed, and if so, redirect to an interstitial where a prominence reason is requested. This can then get added to the edit event that gets created.~

~~EDIT: An extra form field reveal is a better approach https://github.com/mysociety/alaveteli/issues/6790#issuecomment-1041587428.~~

record-prominence-reason

garethrees avatar Feb 16 '22 14:02 garethrees

A subtlety here is that when we record the reason through the "hide and notify" action it's set to a request status ("not_foi" or "vexatious") rather than free text. Might want to use some sort of canned reasons a la #6487.

garethrees avatar Feb 16 '22 14:02 garethrees

~~As an alternative approach, we could reveal a required "prominence reason" field with JavaScript if the prominence field is changed. This would probably be simpler than dealing with an interstitial. We'd want to make the prominence reason field required if revealed. HTML validation is probably fine, though we could add model validation too.~~

record-prominence-reason-inline

garethrees avatar Feb 16 '22 15:02 garethrees

Adding an InfoRequest#prominence_reason is a better way of handling the form field (https://github.com/mysociety/alaveteli/issues/6746). This issue now just exists to remember to record the form field's value when creating the event.

garethrees avatar May 20 '22 15:05 garethrees

Related to ensuring it's always recorded on change https://github.com/mysociety/alaveteli/issues/7214.

garethrees avatar Aug 11 '22 14:08 garethrees

Closing in favour of https://github.com/mysociety/alaveteli/issues/6746#issuecomment-1133038351

garethrees avatar Sep 21 '22 13:09 garethrees