CLOSER-Cohorts / archivist

Archivist is designed to be an easy to use editor that allows documention of questionnaires and data in DDI-Lifecycle
MIT License
17 stars 8 forks source link

Issue with moving constructs and impossible parents/children #810

Closed HayleyMills closed 2 weeks ago

HayleyMills commented 1 year ago

This is similar to #798

In us version of Archivist, the doc view and construct page are not loading for us5 (instrument ID 1782). This looks like it might be caused by the loop l_pair (ID 254219) being both the parent and child of c_qtwinconf_i NEW (ID 254220).

image image

simonreed commented 5 months ago

@HayleyMills what do you think we should do in the case of this specific instrument? I'm not sure whether we should removed the node (254219) but then it's a parent and child.

["{\"id\"=>254219, \"label\"=>\"l_pair\", \"ancestry\"=>\"{254219,254220,254219}\"}",    
 "{\"id\"=>254219, \"label\"=>\"l_pair\", \"ancestry\"=>\"{254221,254219,254220,254219}\"}",
 "{\"id\"=>254219, \"label\"=>\"l_pair\", \"ancestry\"=>\"{254222,254219,254220,254219}\"}",
 "{\"id\"=>254219, \"label\"=>\"l_pair\", \"ancestry\"=>\"{254223,254222,254219,254220,254219}\"}",
 "{\"id\"=>254220, \"label\"=>\"c_qtwinconf_i NEW\", \"ancestry\"=>\"{254220,254219,254220}\"}"]

The id from here is the control_construct that has the circular reference.

HayleyMills commented 5 months ago

I'll take a look, is this in the staging db and the id is the id in the control_constructs table? @simonreed As I can't find it using that. Do you have the instrument id?

simonreed commented 5 months ago

It's on the production closer-archivist-us instance. It's the same instrument (ID 1782) as your original comment.

HayleyMills commented 5 months ago

Ah sorry, I should have reread the issue! We worked around this, by reimporting a previous export and started again, since this instrument will not load. We don't need to do anything for this particular case now, but is there a way of finding any others?

simonreed commented 5 months ago

I have a script that I can run. For the us instance this was on the only case of it.

HayleyMills commented 4 months ago

@simonreed if you can check the other instances, I'll then close this issue.

simonreed commented 2 weeks ago

I've checked the other instances and it found no further circular instances.