Hi,
how would I build a custom “incomplete” event filter?
When using the “People>event>People with incomplete events” this will not select people if they have anything filled in for date, even if it is only a year, or a rough guess (about …)
I tried building my own:
selecting events with “about|before|after” is fairly easy.
selecting events without a date is more problematic, but by inverting the range 1300-2050 I can get there, and as a plus it selects invalid dates. (although it seems suboptimal)
the same for places, but inverting the regex “..*” gives me events without places. ( the regex “^$” doesn’t seem to work for this)
Unfortunately this still leaves some forms of incomplete dates unselected: where the date is only a year. A regex filter on (text only) date of “…” or the inverse “…-..-..” does not seem to work.
It walks outwards from the Home Person until finding 10 such “incompletes”. Then offers them for you to fix. Or you can tag (on a Person or Family basis) the items as complete (or to be ignored) with a prearranged Tag.
When the focus becomes too wide, change the Home Person and start the outward bound review again.
With the availability of AI to code new tests, you could prompt it to modify the What’s Next? gramplet to drive virtually any kind of similar walk-through worklist.
There are some addon filter rules that basically allow users to construct any search parameters. I copied these filters that others had put together. And no, I cannot find that thread again.
To install the rules you need to add a repository to the Addon ManagerProjects tab.
After enabling the project, hit refresh, then go to the Addons tab and search for “generic” and a list of 9 Generic filter options will be listed that you can install. Generic event filter, etc
The new rules should be added to all the custom filter area. If not, close then relaunch Gramps.
Here are three Event filters concerning their Date entries.
or if you prefer, direct from the custom_filter.xml file
<object type="Event">
<filter name="SuperTool: BlankDates" function="and" comment="Returns events with no dates.">
<rule class="GenericFilterRule_Event" use_regex="False" use_case="False">
<arg value="event.get_date_object().is_empty()"/>
<arg value="# Return &quot;True&quot; if the date is a blank date."/>
<arg value="dateobject=self.event.get_date_object()"/>
</rule>
</filter>
<filter name="SuperTool: IrregularDates" function="and" comment="Returns events with incomplete dates and modified dates">
<rule class="GenericFilterRule_Event" use_regex="False" use_case="False">
<arg value="not (event.get_date_object().is_regular() or event.get_date_object().is_empty())"/>
<arg value="# Return "True" if matches events having a irregular date but not a blank date)<br># see https://gramps-project.org/docs/gen/gen_lib.html?highlight=is_regular<br>#gramps.gen.lib.date.Date.is_regular"/>
<arg value="dateobject=self.event.get_date_object()"/>
</rule>
</filter>
<filter name="SuperTool: RegularDates" function="and" comment="Returns events with full. No dates with any modifiers.">
<rule class="GenericFilterRule_Event" use_regex="False" use_case="False">
<arg value="dateobject.is_regular()"/>
<arg value="# Return &quot;True&quot; if the date is a regular date.&lt;br&gt<br># The regular date is a single exact date, i.e. not text-only, not a range or a span, &lt;br&gt<br># not estimated/calculated, not about/before/after date, and having a year, &lt;br&gt<br># month, and day all non-zero.&lt;br&gt<br># see https://gramps-project.org/docs/gen/gen_lib.html#gramps.gen.lib.date.Date.is_regular"/>
<arg value="dateobject=self.event.get_date_object()"/>
</rule>
</filter>