webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Marriage Report Filter Broken for Families With Multiple Marriages

Open miqrogroove opened this issue 1 year ago • 4 comments

I'm running a marriage report with the following criteria ...

Place: Michigan Start: 01 JAN 1944 End: 31 DEC 1944

There are 9 families listed in the report. All of the results are correct except for the 2nd-to-last entry. It's showing a marriage that took place in Indiana during 1936.

If I switch the date range to 1941, it adds another strange result from Florida during 1935.

Running webtrees v2.1.18 on PHP v8.3.0.

miqrogroove avatar Dec 21 '23 04:12 miqrogroove

So here's what I'm thinking ...

https://github.com/fisharebest/webtrees/blob/e96e110d1e1c5e1d8eac6806f311b102a73c1907/resources/xml/reports/marriage_report.xml#L60

This filter is applied at the Family level, rather than the Marriage level.

In my test case, the Family contains 2 different marriages, as follows:

0 @F1@ FAM
1 MARR
2 DATE 1936
2 PLAC Indiana, USA
1 MARR
2 DATE 1945
2 PLAC Michigan, USA

Now, while neither of those marriages can match my search criteria, in fact the Family does match.

The place filter1 matches the 2nd marriage. The start date filter2 matches the 2nd marriage. The end date filter3 matches the 1st marriage.

The result is a false positive. The filter design effectively assumes a family can never have more than one marriage.

Further testing shows another bug: By changing the filter to Michigan, 1945, the report displays the correct family with the wrong marriage details.

miqrogroove avatar Dec 21 '23 15:12 miqrogroove

I think the possibilty to enter more than one date for the marriage ( without using a specifying type), that is establishing the family, should not be possible (and is imho a gedcom design bug), although family in gedcom has an other meaning than we normaly use. If I do not know the correct date, I would explain that within a note.

arbor95 avatar Jan 16 '24 13:01 arbor95

You have to create a new family in that rare cases

arbor95 avatar Jan 16 '24 13:01 arbor95

No, if your gedcom - input is wrong, you can not expect correct results.

arbor95 avatar Jan 16 '24 18:01 arbor95