Open Sobuno opened 2 months ago
Thanks! I'll get this change into the next version.
Edit: Just thinking, this is likely because individuals may not have a 'BIRT' event. So we should first check for 'BIRT' as you suggest, and fall back to getBirthPlace if needed.
Ok, so if there is a birth event, but no place attached, it would show up empty. And if there is no birth event at all, it will fall back to that list? I can live with that :)
We use your plugin to print out (parts of) the tree to bring to family events and had some questions the other day as to why it looked like some people were born in churches 😜
Sorry, I wasn't clear. If there's a birth event but no place, I'd propose we fall back to the place in getBirthPlace so as to show something if available.
Interesting you mention it looked like people were born in churches. I'm not a genealogy or webtrees expert (I had barely started using webtrees and was just starting my genealogy journey when I took over development of this extension), so tend to look to others on how this all works. However, I personally have been recording the city, region, country in the "Place", and the name as part of the address (e.g. The Johns Hopkins Hospital, 1800 Orleans St, Baltimore, Maryland, United States). So I haven't noticed this difference.
I have no idea which is correct though!
So that's actually the current behavior :) I'd like for people to easily spot we're missing their birth location so they can add it to the printed out version by hand and then I add it to Webtrees - especially the older part of my family is not that technically inclined
Ah, I see! In that case, I'd propose we add this as an option. Something like "If no birthplace, use christening/baptism place". Enable it by default, to keep the current functionality, but allow you to disable it to get the functionality you are looking for.
This option could go next to the option to show birthplace.
Normally the places are town, county,... Then it is a good assumption to use the baptism place if there is no birth place. But if you use chirch name, town, county,... as a place for baptism, then it looks strange that someone is born in a church. So I would suggest to either store the church name in the address field and not in the location (PLAC) or to use shared location _LOC for the church together with PLAC with town, county,... Nevertheless it is a good idea to implement the suggested new option to decide how the place should be decided. The same problem is for the death location. If there is no such location the burial location could be shown instead.
The method you're invoking
getBirthPlace
apparently just takes the first place of what is called Birth Events (public const BIRTH_EVENTS = ['BIRT', 'CHR', 'BAPM'];
)Invoking
getAllEventPlaces(['BIRT'])
instead and using the first element as the birth place (if any) should ensure that only the birth place is actually used.