Windows 10, Gramps ver 5.1.4
The whatsnext gramplet makes use of tags to indicate when a person is complete, a family is complete and a tag to cause the gramplet to ignore a person or family and produce a list of tasks that need doing. Very handy indeed!
I found that there were instances where I wanted to continue to process a person, but still wanted to exclude certain events that I knew could not be updated further: events such as a divorce with a partial date would still appear in the what’s next list even though the family was tagged as complete.
I made an earlier post to the mailing lists asking if it were possible to modify the whatsnext gramplet so it would ignore individual events that were tagged with the ignore tag - such as the divorce events indicated above.
I spent some time learning python and this is what I came up with to modify the function that process the events in this gramplet. I have tested it on my system and it functions as I expected - removing events from the list that are tagged with the ignore tag.
The three lines of code immediately after the function definition are what I added to the whatsnext.py file
def __process_event(self, event):
**if self.__ignore_handle is not None and \**
** self.__ignore_handle in event.get_tag_list():**
** return []**
missingbits = []
date = event.get_date_object()
if date.is_empty():
missingbits.append(_("date unknown"))
elif not date.is_regular():
missingbits.append(_("date incomplete"))
place_handle = event.get_place_handle()
if not place_handle:
missingbits.append(_("place unknown"))
if missingbits:
# translators: needed for French, ignore otherwise
return [_("%(str1)s: %(str2)s"
) % {'str1' : event.get_type(),
'str2' : _(", ").join(missingbits)}] # Arabic OK
else:
return []