-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(long) migration from old dmponline_v4 to roadmap 3.0.1 delivers customized templates with wrong family_id #2813
Comments
Interesting @nicolasfranck. I would suspect that perhaps the original data may have had an incorrect org_id on the project and template. See line
modifiable variable determines whether or not the customization_of is null or contains a value, so maybe it had the wrong org_id and thus pointed to the incorrect template.
I did not personally have to run through the upgrade tasks since my DMPTool came from a different codebase originally. I do recall our former developer, @xsrust, mentioning that the original DMPonline data had some issues like orphaned records or incorrect associations that he needed to deal with prior to the migration. Perhaps its related? Congratulations for getting your system fully migrated to v3! That is a great accomplishment and a lot of work! |
I did some investigation. If you run this query:
then every I've learned that Possible causes?
|
@briri euhm the version of that migration you refer to is from the master branch, not the one from branch |
If I remember correctly, those Looking at the |
I did the test: that migration is causing this issue:
Apparently there are two main loops that call the method About the first loop:
About the second loop:
|
Ugh! That's a complicated mess. Thanks for doing the research into this issue @nicolasfranck We don't have the bandwidth to patch it at the moment. Would you be willing to submit a patch to that specific migration branch? Or, as an alternative, since it seems to have only impacted a few records in your migration (and would likely be similar for others trying to migrate), we could make a note on the upgrade instructions wiki page outlining the bug and its severity (with a link to this issue) and a suggested approach for a manual update of those template records to fix them. |
@briri : by setting this line .. to
I could fix this issue. But I guess that line was there for a reason? Something like was is meant here by "confusing versioning numbers"? |
I'm not sure unfortunately. I migrated from a different codebase so I am unfamiliar with the old dmponline4 table structures and content. Its may have been to deal with an issue/scenario that was unique to the old dmponline data. I added a note to Step 2 on the wiki instructions to let people know about this issue and to offer a manual solution. Can you take a look at how I described it and let me know if there are any ways to make it more clear/helpful to others encountering the same problem? Thanks again @nicolasfranck! |
Another thing that I've found in that branch: it generates entries in table Although you cannot see this easy in the console:
The entries from answers_question_options belong to the right answer, What is probably causing this: https://github.com/DMPRoadmap/roadmap/blob/dmponline4_upgrade_step2/db/migrate/20161122152339_new_plan_template_structure.rb#L637 It is very subtile:
|
yes, that is very subtle. I wonder if adding an additional query parameter to that would help: |
closing this out since you've migrated to the latest version @nicolasfranck |
I've completed the full migration flow from dmponline_v4 to roadmap 3.0.1.
One of the strange things I've seen is that there are now templates with attribute
customization_of
set to a value that has no correspondence with a templateof that
family_id
.So this returns no original template:
This is only true for a few customized templates though (13?) in our collection,
but it makes some controllers crash where the method
Template#base_org
is used.That method looks up the organisation of the original template..
The only place where these attributes are created/updated is in migration
20161122152339_new_plan_template_structure.rb
, but I have no ideawhy templates with same family_id seem to have dissappeared..
Any idea?
The text was updated successfully, but these errors were encountered: