Common Biological Ancestor — a Gramps filter rule V1.1.0

A custom filter rule for Gramps that matches people who share a biological ancestor with a chosen person.

What "biological" means here. Gramps records each child's link to a parent with a child-reference typeBirth, Adopted, Foster, Stepchild or Sponsored — shown in the relationship drop-down on the child reference. This rule treats only the Birth links as biological and follows those alone. Wherever this document says biological, it means "connected through a Birth child-reference". (Gramps' own term for the link is Birth; this addon calls the resulting line biological because that is what the traversal captures.)

Why?

Gramps ships with the rule "People with a common ancestor with <person>". When it walks up the family tree it follows every parent link, regardless of whether a child is a birth, adopted, foster or step child. As a result, adopted and foster children are treated as blood relatives of their adoptive/foster family's ancestors.

This rule does the same job, but follows a parent link only when the child's relationship to that parent is "Birth". Adopted, foster, step and sponsored children are therefore included only if they are also recorded as a birth child in a biological family. A child that appears solely in an adoptive or foster family is given no ancestors beyond itself and will not match through that family.

Requirements

Installation

  1. Close Gramps.

  2. Extract the downloaded ZIP archive.

  3. Copy or extract the project folder into your Gramps user plugin folder. Keep the complete folder structure unchanged, including any locale folder included with the project.

    The user plugin folder is normally located here:

    Replace <version> with the Gramps version folder used on your system.

  4. Start Gramps again.

  5. Check that the installed filter, rule, gramplet or tool is available where described in the project documentation.

If the project does not appear or fails to load, check Help → Plugin Manager for an error message.

Removing the test version

  1. Close Gramps.
  2. Delete the project folder that you added to the Gramps user plugin folder.
  3. Start Gramps again.

Because the project was installed only in the user plugin folder, removing that folder removes the test installation without changing the original Gramps program files.

Usage

  1. In any person view, open Edit → Person Filter Editor.
  2. Add a new filter (or edit an existing one) and click Add to add a rule.
  3. Under the Ancestral filters category, choose "People with a common biological ancestor with <person>".
  4. Enter the reference person's Gramps ID and click OK.
  5. Optionally tick "Return values that do not match the filter rule" to get the complement.

The rule can be combined with other rules exactly like the built-in one, and the resulting filter can be used for reports, exports and tags.

Important: relationship types must be correct

The rule relies entirely on the child reference relationship type (Birth / Adopted / Foster / …) recorded on each child, for both the father and the mother side. If an adopted or foster child is left with the default "Birth" relationship, it will still be counted as biological. It is worth checking that these relationship types are set correctly — especially on blended families, those that mix birth and non-birth children.

For this purpose I have created a companion rule, "People recorded as a non-birth child" (HasNonBirthChildRelation), which lists every child recorded with a non-birth relationship so you can review them: https://myown-project.dk/tools/gramps-filter-rules/non-birth-child-relation

License

GNU General Public License, version 2 or later — same as Gramps. The full text is in the accompanying LICENSE file.

Translations (i18n)

This addon ships with a Danish translation and is ready for more languages. Layout:

<addon folder>/ *.py *.gpr.py po/ template.pot # all translatable strings (source) da.po # Danish translation (source) locale/ da/LC_MESSAGES/addon.mo # compiled Danish catalog (used at runtime)

Gramps loads locale/<lang>/LC_MESSAGES/addon.mo automatically when the interface is set to that language, and falls back to English otherwise. The .mo filename must be exactly addon.mo.

To add another language, e.g. German:

  1. Copy po/template.pot to po/de.po and translate each msgstr.
  2. Compile it to locale/de/LC_MESSAGES/addon.mo. With GNU gettext: msgfmt po/de.po -o locale/de/LC_MESSAGES/addon.mo (or use the Python polib package: pofile('po/de.po').save_as_mofile(...)).
  3. Restart Gramps.

Only strings unique to this addon are translated here; standard Gramps terms (category names, "ID:", the relationship-type names in the drop-down, etc.) come from Gramps' own translations automatically.