In a next version, could a References tab be added to Family editor window (like on any other window)? We could see all references (notes, etc.) to the family.
Mantis entry created: 0013673: Add a References tab to Family editor dialog - Gramps - Bugtracker – Free Genealogy Software
1 Like
I didn’t even that this one was not in this view, on the other hand I add “References” gramplet on each list I find it more useful. May be this should help you too until they implement this feature ?
1 Like
SteveY
March 2, 2025, 10:10pm
3
@PLegoux Is this what you wanted?
The image shows a new “References” tab in the edit family dialog.
In the background is the References gramplet for the same family. This already exists.
This is the example gramps database.
Family view’s References gramplet is limited to Person secondary objects.
It seems like @PLegoux is asking for the full complement of direct secondary object backlink references in the same way that the Person Object Editor has. The Family object backlink references: spouse/children People, Events, and Notes objects.
Citations/Sources, Attributes, Addresses, Media, Internet and LDS seem to be ignored in the Person Object Editor references. There are no Family-to-Family or Association-Family references, right?
References
GUI References - Gramps
API Using database API - Gramps
SteveY
March 2, 2025, 11:19pm
5
Whilst my example screenshot only shows people, it will show backlinks of all types. Internally, it uses the existing code.
I don’t think so
PLegoux:
emyoulation:
It seems like @PLegoux is asking for the full complement of direct secondary object backlink references in the same way that the Person Object Editor has . The Family object backlink references: spouse/children People, Events, and Notes objects.
Yes, that’s exactly it.
I looked into what the References tabs are showing. They are the backlinks
, not the list of secondary objects.
[Gramps SuperTool script file]
version=1
[title]
People Backlinks (see Print output tab)
[description]
find the `backlinks` shown in References tab in People object editor. `find_backlink_handles(handle)`
https://github.com/gramps-project/gramps/blob/maintenance/gramps52/gramps/plugins/gramplet/backlinks.py5
https://gramps.discourse.group/t/need-to-add-the-references-tab-to-family-window/7135/5
[category]
People
[statements]
handle = obj.handle
backlinks = db.find_backlink_handles(handle)
print(f"Backlinks for {category} ({handle}): {gramps_id}")
for class_name, bhandle in backlinks:
obj_id = None
if class_name == 'Person':
obj_id = db.get_person_from_handle(bhandle).gramps_id
elif class_name == 'Family':
obj_id = db.get_family_from_handle(bhandle).gramps_id
elif class_name == 'Event':
obj_id = db.get_event_from_handle(bhandle).gramps_id
elif class_name == 'Place':
obj_id = db.get_place_from_handle(bhandle).gramps_id
elif class_name == 'Source':
obj_id = db.get_source_from_handle(bhandle).gramps_id
elif class_name == 'Citation':
obj_id = db.get_citation_from_handle(bhandle).gramps_id
elif class_name == 'Repository':
obj_id = db.get_repository_from_handle(bhandle).gramps_id
elif class_name == 'Media':
obj_id = db.get_media_from_handle(bhandle).gramps_id
elif class_name == 'Note':
obj_id = db.get_note_from_handle(bhandle).gramps_id
print(f"- {class_name}: {bhandle} (ID: {obj_id})")
[scope]
selected
returns (for Home Person of example.gramps)
Backlinks for People (GNUJQCL9MD64AM56OH): I0044
- Person: Q8HKQC3VMRM1M6M7ES (ID: I1200)
- Family: 9OUJQCBOHW9UEK9CNV (ID: F0017)
- Person: VJFKQCFO7WESWPNKHE (ID: I1106)
- Note: ac380498bac48eedee8 (ID: N0001)
- Note: d0436be64ac277b615b79b34e72 (ID: _custom1)
- Note: f68ce7c9cc166a6424e4fe11a1f (ID: N0024)
- Family: 8OUJQCUVZ0XML7BQLF (ID: F0018)
Every reference instead of (or optionally) just backlinks
@PLegoux Do you want to request an enhancement for all the References tabs? (6.0 PR#1832 will give a bit more functionality to the tab with a context menu.)
[Gramps SuperTool script file]
version=1
[title]
People Secondary Objects (see Print output tab)
[description]
find the "Secondary objects", augments the References tab in People object editor. (`get_referenced_handles_recursively`)
https://github.com/gramps-project/gramps/blob/maintenance/gramps52/gramps/plugins/gramplet/backlinks.py5
https://gramps.discourse.group/t/need-to-add-the-references-tab-to-family-window/7135/5
[category]
People
[statements]
handle = obj.handle
secondarylinks = obj.get_referenced_handles_recursively()
print(f"Secondary links for {category} ({handle}): {gramps_id}")
for class_name, bhandle in secondarylinks:
obj_id = None
if class_name == 'Person':
obj_id = db.get_person_from_handle(bhandle).gramps_id
elif class_name == 'Family':
obj_id = db.get_family_from_handle(bhandle).gramps_id
elif class_name == 'Event':
obj_id = db.get_event_from_handle(bhandle).gramps_id
elif class_name == 'Place':
obj_id = db.get_place_from_handle(bhandle).gramps_id
elif class_name == 'Source':
obj_id = db.get_source_from_handle(bhandle).gramps_id
elif class_name == 'Citation':
obj_id = db.get_citation_from_handle(bhandle).gramps_id
elif class_name == 'Repository':
obj_id = db.get_repository_from_handle(bhandle).gramps_id
elif class_name == 'Media':
obj_id = db.get_media_from_handle(bhandle).gramps_id
elif class_name == 'Note':
obj_id = db.get_note_from_handle(bhandle).gramps_id
print(f"- {class_name}: {bhandle} (ID: {obj_id})")
[scope]
selected
returns (for Home Person of example.gramps)
Secondary links for People (GNUJQCL9MD64AM56OH): I0044
- Family: 9OUJQCBOHW9UEK9CNV (ID: F0017)
- Family: 8OUJQCUVZ0XML7BQLF (ID: F0018)
- Note: ac380498c020c7bcdc7 (ID: N0003)
- Note: b39ff01f75c1f76859a (ID: N0013)
- Note: b39ff11d8912173cded (ID: N0014)
- Note: c140d4c29520c92055c (ID: N0015)
- Citation: c140d5e5dbf300411bf (ID: C2831)
- Citation: c140d25efc045ab2ea5 (ID: C0974)
- Citation: c140d25efe703834da4 (ID: C0975)
- Citation: c140d53ab8b377b4174 (ID: C2828)
- Citation: fb471c4e917139fd7ee300b9b28 (ID: C02863)
- Tag: bb80c2b235b0a1b3f49 (ID: None)
- Citation: c140d56d19a1ced4c7a (ID: C2829)
- Media: B1AUFQV7H8R9NR4SZM (ID: O0008)
- Media: 238CGQ939HG18SS5MG (ID: O0010)
- Note: ac380498bac48eedee8 (ID: N0001)
- Citation: c140d25ef1c0e90ee81 (ID: C0973)
- Citation: c140d5aa362797c32d4 (ID: C2830)
- Citation: c140d5e5dbf300411bf (ID: C2831)
- Citation: c140d73a2ca52f37800 (ID: C2835)
- Place: WTAKQCGG8L8LYZCSBB (ID: P1643)
- Family: 8OUJQCUVZ0XML7BQLF (ID: F0018)
- Note: ac3804a8405171ef666 (ID: N0006)
- Citation: c140d694e647717b683 (ID: C2832)
- Citation: f7074a2495c517d87df60cd47ab (ID: C2857)
- Person: VJFKQCFO7WESWPNKHE (ID: I1106)
- Person: Q8HKQC3VMRM1M6M7ES (ID: I1200)
- Citation: c140d694e647717b683 (ID: C2832)
- Person: VJFKQCFO7WESWPNKHE (ID: I1106)
- Event: a5af0ecb107303354a0 (ID: E1656)
- Citation: c140d7c7bdc1fedb030 (ID: C2836)
- Event: a5af0ecb11f5ac3110e (ID: E1657)
- Event: a5af0ecb12e29af8a5d (ID: E1658)
More is probably better but at least the same as what is currently found in the Person references
1 Like