coldfront icon indicating copy to clipboard operation
coldfront copied to clipboard

Project Export/Import

Open RyanChang0369 opened this issue 3 years ago • 3 comments

Added ability to export and import Coldfront projects. This was built on top of pull request https://github.com/ubccr/coldfront/pull/359 (ORCID support).

Issues Certain "linked" models, such as resources and allocations, do not import correctly.

RyanChang0369 avatar Feb 07 '22 20:02 RyanChang0369

I think my trouble primarly lies with how to properly serialize/deserialize a many to many Django relationship. The relationship serializes as a list of integer ids, but they are removed when serializers.deserialize is called (the list becomes empty). If anyone can help with that, it would be great.

RyanChang0369 avatar Feb 07 '22 20:02 RyanChang0369

Issue fixed: All models, including linked models, now export and import correctly. Importing multiple projects that share some common model instances, such as the same user, is now supported (those project will share the common model instances).

Manual testing has been done with Projects with ProjectUsers, Groups, Publications, Grants, Allocations and their associated Resources, AllocationUserNotes, ProjectAdminComment, ProjectUserMessage, ProjectReview, and ResearchOutput.

RyanChang0369 avatar May 02 '22 17:05 RyanChang0369

HI @RyanChang0369 We really appreciate the pull requests you've submitted to our project! We're working to get them tested and merged over the next month. This one looks like it includes our modifications also. Can you resubmit the PR with just your changes? I believe the git rebase functionality should work for you. https://docs.github.com/en/get-started/using-git/about-git-rebase Thanks!

dsajdak avatar Jul 15 '22 19:07 dsajdak