Description
As per slack discussion we discussed how to deal with fields that cannot be modified by users once the instrument or experiment is created. We created T379247: MPIC: Set form fields as read-only where appropriate when editing an instrument/experiments to set those fields as read-only when appropriate and, after that, we discussed the possibility of adding a new feature to MPIC to know when an instrument or experiment has been already turned on for the first time and consider that criterion as the one to allow or not to modify those fields.
So, the purpose of this ticket is to add that new feature to MPIC. We could add a new was_activated column in the database to save the fact that the instrument/experiment was already activated. That is, status is the field we already use to express that the instrument/experiment is or not currently activated and was_activated will be a new one to say whether or not an instrument/experiment was already turned on/activated in the past, regardless its current status. That way MPIC will know when an instrument/experiment was already launched and it will be able to disallow to modify some specific fields that cannot be edited after that fact.
T379247: MPIC: Set form fields as read-only where appropriate when editing an instrument/experiments is the ticket where we have to work on setting affected fields properly according to the right criterion. We would have to modify the criterion for the first ticket because, at the time of writing this, it talks about disallowing editing once the instrument/experiment is already created (regardless whether it was activated)
Acceptance criteria
- MPIC stores in the database when an instrument/experiment has been already turned on
- There is a new was_activated column in the database to store that fact
- Logic has been updated to deal with that (was_activated will be set to true when the instrument/experiment is turned on for the first time)