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

Birthday and Anniversary Report: add person ID #1445

Merged
merged 1 commit into from Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion gramps/plugins/textreport/birthdayreport.py
Expand Up @@ -104,6 +104,7 @@ def __init__(self, database, options, user):
self.filter_option = menu.get_option_by_name('filter')
self.filter = self.filter_option.get_filter()
self.showyear = mgobn('showyear')
self.inc_gid = mgobn('inc_id')
pid = mgobn('pid')

self.set_locale(menu.get_option_by_name('trans').get_value())
Expand Down Expand Up @@ -137,7 +138,11 @@ def get_name(self, person, maiden_name = None):
surname_obj.set_surname(maiden_name)
else:
name = Name(primary_name)
return self._name_display.display_name(name)
if self.inc_gid:
return "%s (%s)" % (self._name_display.display_name(name),
person.get_gramps_id())
else:
return self._name_display.display_name(name)

def add_day_item(self, text, month, day, person=None):
""" Add an item to a day. """
Expand Down Expand Up @@ -509,6 +514,8 @@ def add_menu_options(self, menu):
alive.set_help(_("Include only living people in the report"))
menu.add_option(category_name, "alive", alive)

stdoptions.add_gramps_id_option(menu, category_name)

deadtxt = StringOption(_("Dead Symbol"), _(_DEADTXT))
deadtxt.set_help(_("This will show after name to indicate that person is dead"))
menu.add_option(category_name, "deadtxt", deadtxt)
Expand Down