CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
56 stars 13 forks source link

Update React pages so a user cannot edit a DMP created in the 'Create Plan' workflow #532

Closed briri closed 3 months ago

briri commented 5 months ago

DMPs can now be created in 2 different ways:

The Dashboard that is displayed shows ALL registered DMPs regardless of the method used to create them. This is because we want the pilot partner admins to be able to curate related works that are discovered for any of their DMPs.

The React pages work with the DMP-ID record that is stored in the DMPHub Dynamo Table. This is fine for DMPs created via the 'DMP Upload' workflow. Changes made to a DMP created via the old Create Plan workflow though will update the DMPHub copy of the DMP ID and not the old plans,contributorsandresearch_outputs` tables.

I added logic in the controllers/api/v3/dmps_controller.rb to backfill changes into these tables but it feels fragile and will not be sustainable. The new system we are building will not have this issue.

To save ourselves time and headaches. We should update the React code so that when the GET /dmps/10.12345/A1B2C3 call includes a "draft_data": { "legacy_dmp": "true", "legacy_path": "plans/12345" } flag, the React page should not allow the user to modify anything besides the Related Works.

A message should be displayed for the user explaining that they must go to the page supplied in the legacy_path to modify the DMP.

briri commented 3 months ago

closing this one out since we removed these from the DMP Uploads dashboard