Closed stefjoosten closed 2 years ago
Hi @stefjoosten can you exclude the possibility that one of the two has trailing whitespace?
Yes, that is excluded. @stefjoosten has shown me what was going on. There were quite a few different instances that had this.
Ok. I'll have a look at it this weekend. Could you email me the test population.
Before I can work with the files you've sent me, I need to fix some issue:
You should use the exec-engine SetConcept instead of InsAtom for changing atom types, e.g.:
RULE "Typering van Videobronnen" :
I[Beheerseenheid] /\ voorzieningtype;"Videobron"; voorzieningtype~ |- I[Videobron]
VIOLATION (TXT "{EX} InsAtom;Videobron;", SRC I[Beheerseenheid])
must be:
RULE "Typering van Videobronnen" :
I[Beheerseenheid] /\ voorzieningtype;"Videobron"; voorzieningtype~ |- I[Videobron]
VIOLATION (TXT "{EX} SetConcept;Beheerseenheid;Videobron;", SRC I[Beheerseenheid])
Ok, now I can conclude that it is a whitespace issue.
Please check the excel sheet and notice that e.g. Ambulance voorziening
has 9 trailing whitespaces at most places, but 20 trailing whitespaces at the sheet Voorziening
.
The prototype framework works as expected, it just see those as two different atoms; as it should in my opinion.
So clean up the import sheet and you are good to go.
Yes, that is excluded. @stefjoosten has shown me what was going on. There were quite a few different instances that had this.
What made you think so @hanjoosten?
Sorry @Michiel-s . @stefjoosten and I had a joint session looking into this issue. Because there were more than multiple different words that had this issue, we convinsed each other that it couldn't be a whitespace problem. I should have known better
No worries. Just asking.
What happened
During my work for the emergency centers, I encountered a strange phenomenon, which I have never seen before. The following screenshot shows that some atoms of type "Voorziening" have multiple records in the database. Not surprisingly, this affects the behaviour of the application in many undesirable ways. Here is screenshot 1.![Screenshot 2022-01-26 at 07 16 19](https://user-images.githubusercontent.com/275768/151113733-56e128a9-07c7-4f7a-8de6-6ff1568f2861.png)
What I expected
Screenshot 2 shows what I expected:![Screenshot 2022-01-26 at 07 33 40](https://user-images.githubusercontent.com/275768/151114987-79ee9ea7-0f1b-45d4-9898-11303fe0a80c.png)
Version of ampersand that was used
I used container images ampersandtarski/prototype-framework:v1.13.0 and ampersandtarski/ampersand:v4.6.2, both of which are on docker hub.
Steps to reproduce Screenshot 1
Steps to reproduce Screenshot 2
Context / Source of ampersand script
I will have to put some effort into making this issue reproducible. The symptoms clearly point a finger towards the population importer, so I hope @Michiel-s already has a hunch about possible causes in a quest to find the root cause.