Page MenuHomePhabricator

MPIC: Register the fact that an instrument/experiment has been activated for the first time
Closed, ResolvedPublic3 Estimated Story Points

Description

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)

Technical notes

Event Timeline

Sfaci set the point value for this task to 1.Nov 8 2024, 12:18 PM
Sfaci renamed this task from MPIC: Allow users to modify instruments/experiments as long as the artifact has never been turned on to MPIC: Register the fact that an instrument/experiment has been activated for the first time.Nov 8 2024, 12:45 PM
Sfaci updated the task description. (Show Details)
Sfaci updated the task description. (Show Details)
Milimetric changed the point value for this task from 1 to 3.Nov 15 2024, 4:05 PM
Milimetric moved this task from BACKLOG to MPIC Alpha Scope on the Test Kitchen board.

hi @Sfaci - it feels like we need copy somewhere in the forms to indicate/explain to the owner that certain fields will be read-only (disabled for all intents/purposes) once an instrument/experiment is active and underway?
cc @Sarai-WMF

hi @Sfaci - it feels like we need copy somewhere in the forms to indicate/explain to the owner that certain fields will be read-only (disabled for all intents/purposes) once an instrument/experiment is active and underway?
cc @Sarai-WMF

Following our discussion in Slack, the copies of the activation confirmation dialogs have been updated to inform users that specific fields won't be editable if they proceed to turn artifacts on. The dialogs' copy will be updated as part of T373907: MPIC: Improve application copy.

phuedx subscribed.

This will be ready for testing once T379247: MPIC: Set form fields as read-only where appropriate when editing an instrument/experiments is. I've requested a minor change on https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/134 about when the tooltips are added, which blocks merging the patch.

Change #1100502 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/deployment-charts@master] Metrics Platform Instrument/Experiment Configurator: Deploying to staging

https://gerrit.wikimedia.org/r/1100502

Change #1100504 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/deployment-charts@master] Metrics Platform Instrument/Experiment Configurator: Deploying to production

https://gerrit.wikimedia.org/r/1100504

Change #1100504 merged by jenkins-bot:

[operations/deployment-charts@master] Metrics Platform Instrument/Experiment Configurator: Deploying to production

https://gerrit.wikimedia.org/r/1100504

Change #1100502 merged by jenkins-bot:

[operations/deployment-charts@master] Metrics Platform Instrument/Experiment Configurator: Deploying to staging

https://gerrit.wikimedia.org/r/1100502