roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Bug when merging orgs with the same customized funder template

Open benjaminfaure opened this issue 3 years ago • 0 comments

The bug occurs when attempting to merge two orgs with the same customized funder template

What version of the DMPRoadmap code are you running? (e.g. v2.2.0) v3.0.6

Expected behaviour:

Orgs should merge

Actual behaviour: Triggers :

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "templates_customization_of_version_org_id_key"
DETAIL:  Key (customization_of, version, org_id)=(918416931, 0, 4) already exists.
: UPDATE "templates" SET "org_id" = 4 WHERE "templates"."org_id" = $1

because each org can customized a template once.

Steps to reproduce: Create two orgs, each should customize the same funder template, it can be published or not. Then try to merge one into another

This one seems a bit tricky, you can't just delete one of the templates because there could be plans attached to it. Merging the two templates could be a solution, but you would have to handle example, guidances and new sections ...

benjaminfaure avatar Apr 21 '22 08:04 benjaminfaure