magicsunday / webtrees-descendants-chart

SVG based descendants chart module for webtrees genealogy application.
GNU General Public License v3.0
26 stars 8 forks source link

Option to plot descendants children ordered by age, when spouse hidden #39

Closed zeezhao closed 10 months ago

zeezhao commented 11 months ago

Is your feature request related to a problem? Please describe. Again, thanks for this great module!

In some instances for a polygamous family, there is the need to display the children of a parent by age seniority. For instance, lets say a father has 2 wives (W1, W2) and each wife has 2 children:

Describe the solution you'd like If "Hide the spouses associated with an individual" option is selected from the chart, then also have an option to order children by Age.

If no Age entered, then just the current default sorting for display.

Another solution may be the ability to manually reorder the children displayed. But I imagine this may be more complicated. Thank you.

magicsunday commented 11 months ago

Hello. Thanks for the hint. This appears to be a bug introduced by the customization to display spouses. In general, the children should be sorted by birth date if no spouses are displayed.

zeezhao commented 11 months ago

Hello @magicsunday - Thank you for the feedback. Please do you know if this is a quick fix, or it will require more time?

magicsunday commented 11 months ago

Hi @zeezhao,

I think I fixed it. I created a new release version. Please check it out here: https://github.com/magicsunday/webtrees-descendants-chart/releases/tag/1.4.1

zeezhao commented 11 months ago

Thanks for your new release!

I had a quick look, and I found that:

Thanks for your help

magicsunday commented 11 months ago

You are right. Its not fixed. I will have to take a deeper look.

magicsunday commented 10 months ago

Seems to fit now:

grafik grafik

Check out release 1.4.2

zeezhao commented 10 months ago

Thanks for your quick turnaround - much appreaciated!

I did a quick test and it seems to work when every date is set in a tree. However because some records can not be fixed, please here are my observations:

  1. When birthdates are not set in some branches because unknown, the order appears random. Please is it possible retain the original order of the children, as set up in webtrees? So if any date in a branch-level is not set, then default to original order. [Using above example, if for instance C1 or C2 or C3 or C4 birthdate is not stated, then just display as C1, C3, C2, C4 as normal]
  2. When privacy is set to hide birth i.e. "Hide from everyone", the order again seems random. I imagine birthdate cannot be used in this instance, so please is it possible retain the original order of the children as set up in webtrees? This is necessary, as for some printing there is a need to hide birthdates. [Using above example, if birthdates cant be read at all, then just display as C1, C3, C2, C4 as normal]
  3. In summary, the default should be: if any birthdate in a branch at a level is not set, then default to original order as set up in webtrees. [Using above example, if at least one birthdate not available at the level, then just display as C1, C3, C2, C4 as normal]

I suspect this may make the code more complicated. The main reason is some birthdates are not known and may never be known due age/no records...

Thanks for your help!

edit: added comments to clarify using earlier examples.

magicsunday commented 10 months ago

Btw. webtrees also seems not to handle polygamous families the right way: grafik

zeezhao commented 10 months ago

Thanks for your reply.

I don't use the "Family Book" module at all.

In my opinion, your "webtrees-descendants-chart" module is excellent, in terms of functionality, presentation, download ability, etc. This is the only add-on module I use, and I occasionally use "topola" too. Everything else I use is just for data entry. So for me, your module is what makes webtrees as a whole great!

In my using webtrees own "Descendants" chart, it shows it correctly under each wife, provided you have set up a spouse for each person, which I normally do even if it is a "dummy". My use case is 1 male to a few females. The webtrees descendants chart does not have ability to "hide spouses" anyway. I am using v2.1.17.

edit: Fixed typos, etc

magicsunday commented 10 months ago

Fixed in https://github.com/magicsunday/webtrees-descendants-chart/releases/tag/1.5.0

zeezhao commented 10 months ago

Hi - Thanks for the latest release.

Thanks for your help. Much appreciated.