DMPRoadmap / roadmap

DCC/UC3 collaboration for a data management planning tool
MIT License
102 stars 109 forks source link

Guidance migration error #263

Closed sjDCC closed 7 years ago

sjDCC commented 7 years ago

The current data on staging has mismatched or falsely migrated data somehow. I thought it seemed odd that every funder template is showing as having been customised as in reality very few orgs have done this. Digging around, it seems that the funders guidance has been transposed into institutional guidance. It means that now when you create a plan, it gives you a message that the "Plan was successfully created - using template customised by your institution" but in reality you're getting the funder template with funder guidance marked up as being from the institution. Eeek!

Here are a couple of screengrabs from the Academy of Finland template with Helsinki guidance. The first one is the current live service. The second is staging where the AoF guidance has been renamed UH guidance (have we got an action that's automatically creating a guidance group for the org shortname that's behind this?). There is also Uni of Helsinki guidance (i.e. the actual org guidance by theme) but this only shows on the admin preview not the front end (3rd screengrab).

live-tuuli

mismatched-guidance

capture

xsrust commented 7 years ago

related to #223 This behavior is because the template's organisation is that of the customizer, so the current code incorrectly attributes the question.guidance field to the customizing organisation. After fixing #223 and implementing annotations, the question.guidance field will be moved to the annotations table, and will be updated to point correctly at the organisation who generated the guidance.

Once this is done, the front-end can be updated to display the correct org for each guidance

sjDCC commented 7 years ago

Looking on DMPonline test. It seems the guidance is reassigned now, but it isn't noting who the guidance is from. The template owner name should be flagged. In this case it should say "AHRC guidance" not just "Guidance"

capture

vyruss commented 7 years ago

@sjDCC I'm re-migrating the data as we speak, this hasn't got the fixes applied yet.

sjDCC commented 7 years ago

Hi @vyruss - this ticket is still in progress so I'm not sure there is anything new to push live yet. I just noticed the missing tag when showing @dsisu the project board and how to test so wanted to note it in case

vyruss commented 7 years ago

@sjDCC there have been changes to the migration scripts that have not yet been applied to the -test DB so that's what I'm doing now.

xsrust commented 7 years ago

addressed in migrations: https://github.com/DMPRoadmap/roadmap/commit/0c74f1ad63f0e330525b9c3f06b4c5d6029332fb and https://github.com/DMPRoadmap/roadmap/commit/ebc5ed836900e629c2506d91b9265920500c8a33

Migration will need to be re-run before ticket can be tested

sjDCC commented 7 years ago

The guidance all attributes correctly now so closing this one out.