# What is the role of 'Role'?

**URL:** <https://gramps.discourse.group/t/what-is-the-role-of-role/6874>\
**Category:** Help\
**Tags:** event-sharing, bug-filed\
**Created:** [January 29, 2025, 9:01am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874 "2025-01-29T09:01:52Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [January 29, 2025, 9:01am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/1 "2025-01-29T09:01:52Z")

</div>

When adding an event to a person, there’s a field called ‘Role’. My understanding is that ‘Role’ is a description of the person’s involvement in the event. There’s a number of predefined roles, but any text can be entered.

An example: In censuses, which are typically household based, each person have a role, usually ‘housefather’, ‘housewife’, ‘son/daughter/child’, ‘relative’, ‘lodger’, ‘servant’ etc. So I create the census event and add it to each person in the family mentioned in the census source with the according role description.

But what is the role information used for in Gramps?  
When I create any report it looks like all events not having Role equal to ‘Primary’ are filtered out ! So the big question - is the only purpose of ‘Role’ to prevent the events appearing in reports?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 10:23am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/2 "2025-01-29T10:23:57Z")

</div>

**Roles** is an subject of the User Guide that needs improvement.

A “[Roles, Relationships & Associations](https://gramps-project.org/wiki/index.php/Roles,_Relationships_%26_Associations)” article was started but never progressed far enough to be useful. It is just a “stub” placeholder. If this thread creates a better understanding of Roles, perhaps the article could improved and be linked from the Glossary Terms. (And allow the Gossary entries to be abbreviated.)

The [📑 Gramps Glossary](https://gramps-project.org/wiki/index.php/Gramps_Glossary) breaks it down into 3 terms:

- [role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#role) (in general) : function performed or part played by a person (or other Gramps [object](https://gramps-project.org/wiki/index.php/Gramps_Glossary#object)) in a particular situation. When objects of Gramps are linked, a Reference is created where the implicit Role disambiguates the relative nature of the reference. _For explicitly defined roles, see [event role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#event_role) and [association role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#association)_
- [Event Role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#event_role) : The [role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#role) a [Person](https://gramps-project.org/wiki/index.php/Gramps_Glossary#person) plays in an [Event](https://gramps-project.org/wiki/index.php/Gramps_Glossary#Event). The focal Person(s) holds a [_ **Primary role** _](https://gramps-project.org/wiki/index.php/Gramps_Glossary#primary) in personal Events and the Family holds a [_ **Family role** _](https://gramps-project.org/wiki/index.php/Gramps_Glossary#family_role) in Family events. In Gramps, an Event can be linked to as many participants as desired. Each [Person](https://gramps-project.org/wiki/index.php/Gramps_Glossary#person) may participate in different roles but more than one Person might play the same role. The Event Role captures this and can be changed in the [Event Reference Editor](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#Event_Reference_Editor_dialog). Some common Roles are pre-defined but the user can add other [custom](https://gramps-project.org/wiki/index.php/Gramps_Glossary#custom) Roles by just typing in the appropriate new label into the [selector combo box](https://gramps-project.org/wiki/index.php/Gramps_Glossary#selector_combo_box).  
Pre-defined Types of Event Role: [Aide](https://gramps-project.org/wiki/index.php/Gramps_Glossary#aide), [Bride](https://gramps-project.org/wiki/index.php/Gramps_Glossary#bride), [Celebrant](https://gramps-project.org/wiki/index.php/Gramps_Glossary#celebrant), [Clergy](https://gramps-project.org/wiki/index.php/Gramps_Glossary#clergy), [_ **Family** _](https://gramps-project.org/wiki/index.php/Gramps_Glossary#family_role), [Godparent](https://gramps-project.org/wiki/index.php/Gramps_Glossary#godparent), [Groom](https://gramps-project.org/wiki/index.php/Gramps_Glossary#groom), [Informant](https://gramps-project.org/wiki/index.php/Gramps_Glossary#informant), [_ **Primary** _](https://gramps-project.org/wiki/index.php/Gramps_Glossary#primary), [Witness](https://gramps-project.org/wiki/index.php/Gramps_Glossary#witness), [_ **Unknown** _](https://gramps-project.org/wiki/index.php/Gramps_Glossary#unknown), _[custom](https://gramps-project.org/wiki/index.php/Gramps_Glossary#custom)_
- [Association Role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#association) : (_[sec. obj.](https://gramps-project.org/wiki/index.php/Gramps_Glossary#secondary_object)_) - The [roles](https://gramps-project.org/wiki/index.php/Gramps_Glossary#role) in [Associations](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Associations) are to explicitly define the how one person relates to another.  
Association roles are used when the relationship falls outside the implicit roles of a family relationship or the explicit roles in shared events. These custom roles convey relationships that might not readily apparent… such as a [penpal](https://wikipedia.org/wiki/Pen_pal) or the [eponymous person](https://wikipedia.org/wiki/Eponym) honored by a namesake. Association roles may also be used as placeholder when the actual genetic connection has not yet been discovered.  
Association roles are created and edited with the [Person Reference Editor](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#Person_Reference_Editor), which includes no pre-defined roles. This feature starts with a blank list of [custom types](https://gramps-project.org/wiki/index.php/Gramps_Glossary#custom)) and the default “Godfather” role is only shown as a hint.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 10:27am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/3 "2025-01-29T10:27:53Z")

</div>

> [@csam](#):
>
> When I create any report it looks like all events not having Role equal to ‘Primary’ are filtered out !

clarification: **Primary** for _Person Events_ and **Family** for _Family Events_ are the 2 roles that are almost always recognized by reports.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 10:39am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/4 "2025-01-29T10:39:48Z")

</div>

One purpose for which I leverage the Role is for exclusionary purposes. For disproven events (such as when a Baptism date has propagated as a Birth date in many reference books and databases), I will set the Role as Disproven.

This allows me to store the research about why I believe it to be misinformation.

However, export of Events with non-standard Roles might drop the Role distinction… and propagate the mythical event.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 29, 2025, 11:57am UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/5 "2025-01-29T11:57:42Z")

</div>

Roles are important for Shared events. When the same event record is shared with other people who had a Role in the event. The main person is Primary. Many reports and tools are designed to only look at the Primary person.

A person’s Baptism/Christening would be Primary for the person, but others sharing the event could be Godfather, Godmother, Officiant.

Sharing a families’ Marriage record could be the Officiant, members of the wedding party or Witnesses to the signed certificate.

In a Census record the Primary would be Head of Family or Household and the shared Roles would be the their relationship to that Primary/Head.

The big events for a person; Birth, Death, Burial need to be Primary. The same goes for the Family’s main events Marriage and Divorce need to have the role Family.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 2:46pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/6 "2025-01-29T14:46:20Z")

</div>

> [@DaveSch](#):
>
> Roles are important for Shared events. When the same event record is shared with other people who had a Role in the event.

The role is demoted to “[uknown](https://gramps.discourse.group/t/default-event-type/2467/11)” in the shared reference.

Whether you drag’n’drop or use the Event Selector dialog to share, it is always necessary to choose the correct role.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [January 29, 2025, 3:18pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/7 "2025-01-29T15:18:03Z")

</div>

I looked into the code of “Detailed Descendant Report”.  
It’s using a method named [`person.get_primary_event_ref_list`](https://gramps-project.org/docs/search.html?q=get_primary_event_ref_list).

However, there’s also a [`person.get_event_ref_list`](https://gramps-project.org/docs/gen/gen_lib.html?highlight=get_event_ref_list#gramps.gen.lib.person.Person.get_event_ref_list) method, so I changed one line in the report code, and now I get the expected output.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 29, 2025, 3:29pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/8 "2025-01-29T15:29:44Z")

</div>

You just need to set up a system to make the same changes after installing a Gramps upgrade.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 3:50pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/9 "2025-01-29T15:50:55Z")

</div>

> [@csam](#):
>
> It’s using a method named “person.get\_primary\_event\_ref\_list”.

Did a GitHub [repository search for that `person.get_primary_event_ref_list` method](https://github.com/search?q=repo%3Agramps-project%2Faddons-source%20person.get_primary_event_ref_list&type=code) in the addons. And [another search in the core](https://github.com/search?q=repo%3Agramps-project%2Fgramps%20person.get_primary_event_ref_list&type=code).

Which report did you hack?

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [January 29, 2025, 3:51pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/10 "2025-01-29T15:51:15Z")

</div>

Yes, the best would of course be to change the report, so you can choose to include all events or only those with primary role.  
I guess that would require a change request, but I don’t know how or whre to ask for that.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [January 29, 2025, 3:51pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/11 "2025-01-29T15:51:55Z")

</div>

`./plugins/textreport/detdescendantreport.py`

> <https://github.com/gramps-project/gramps/blob/0f8d4ecd429431b4df64910962f8764af9ff1766/gramps/plugins/textreport/detdescendantreport.py#L947>

The change looks like this:

```python
        if self.inc_events:
# for event_ref in person.get_primary_event_ref_list():
            for event_ref in person.get_event_ref_list():
                if first:

```

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 4:18pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/12 "2025-01-29T16:18:42Z")

</div>

Thanks. Added links.

Referenced the line number of that Report module on 5.2 maintenance branch on GitHub. This allows others to find the exact spot that you tweaked.

Added links in [your original posting](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/7) so that the method description can be found in the Developer docs. (The 1st link is an example of search all the develop docs for a method name … the search found 4 instances. The 2nd method links to the result General module docs rather than the Utilities module.)

_We don’t mention the [documentation resources](https://gramps.discourse.group/t/about-the-user-manual-category/2585) often enough._

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 29, 2025, 4:25pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/13 "2025-01-29T16:25:45Z")

</div>

> [@csam](#):
>
> I guess that would require a change request, but I don’t know how or whre to ask for that.

[![MantisBT59x52, 25%](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/b/b36b1db3760774b52d54361585dbe852f88de2d0.svg)](https://gramps-project.org/bugs/my_view_page.php)  
The Contact page on the Wiki has a [Requesting enhancements](https://gramps-project.org/wiki/index.php/Contact#Requesting_enhancements) subsection. We use the MantisBT issue tracker. ([Switching to GitHub Issues is currently being discussed](https://sourceforge.net/p/gramps/mailman/gramps-devel/thread/7ab2a968-a691-4774-84a9-f6985b4ad34d%40gramps-project.org/#msg59113680) on the Developer mailling list.)

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [January 29, 2025, 6:54pm UTC](https://gramps.discourse.group/t/what-is-the-role-of-role/6874/14 "2025-01-29T18:54:38Z")

</div>

Created ID = 0013596 in MantisBT

[0013596](https://gramps-project.org/bugs/view.php?id=13596): Detailed Descendant Report only lists events with role = Primary

Regards  
Claus
