Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zeezhao opened this issue Aug 16, 2023 · 11 comments
Closed
Labels
bug Something isn't working

Comments

@zeezhao
Copy link

zeezhao commented Aug 16, 2023

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:

  • W1 has C1, C3.
  • W2 has C2 ,C4.
  • Where age of C1>C2>C3>C4
  • If "Hide the spouses associated with an individual" option is selected from the chart, I want to show children order as: C1, C2, C3, C4 instead of C1, C3, C2, C4

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.

@zeezhao zeezhao changed the title Plot a descendants children by ordered by age Plot Descendants Children ordered by Age Aug 16, 2023
@zeezhao zeezhao changed the title Plot Descendants Children ordered by Age Plot descendants children ordered by age, when spouse hidden Aug 16, 2023
@zeezhao zeezhao changed the title Plot descendants children ordered by age, when spouse hidden Option to plot descendants children ordered by age, when spouse hidden Aug 16, 2023
@magicsunday magicsunday added the bug Something isn't working label Aug 16, 2023
@magicsunday
Copy link
Owner

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
Copy link
Author

zeezhao commented Aug 17, 2023

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

@magicsunday
Copy link
Owner

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
Copy link
Author

zeezhao commented Aug 20, 2023

Thanks for your new release!

I had a quick look, and I found that:

  • For the case I mentioned above for W1 & W2, it is still showing: C1, C3, C2, C4, whereas I want C1, C2, C3, C4
  • Also, in some cases where some birthdates are not filled because not known, it is better to maintain the existing order. I think a condition of: if and only if all birthdays are filled, do the new sorting by age. If not default to the existing sorting.

Thanks for your help

@magicsunday
Copy link
Owner

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

@magicsunday
Copy link
Owner

magicsunday commented Aug 21, 2023

Seems to fit now:

grafik
grafik

Check out release 1.4.2

@zeezhao
Copy link
Author

zeezhao commented Aug 21, 2023

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
Copy link
Owner

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

@zeezhao
Copy link
Author

zeezhao commented Aug 21, 2023

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
Copy link
Owner

@zeezhao
Copy link
Author

zeezhao commented Aug 23, 2023

Hi - Thanks for the latest release.

  • When the "Hide the spouses associated with an individual. " is Not ticked, the chart is blank.
  • The date condition should please be applied to Marriage date too i.e. if any marriage date in a branch at a level is not set, then default to original family order as set up in webtrees. Right now, v1.5.0 is causing a random order of families for me, since marriage date is not necessarily know. I believe it was same in previous version too.
  • I also did a quick test with "Show married names.", and it did not seem to work. Note that I recently fixed married names to use correct GED format, instead of the special on webtrees was using.
  • Children also still appears random when date not set. Please preserve original order in this instance.

Thanks for your help. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants