Help with filtering for roles

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help with filtering for roles

adrian.davey
Can anyone please advise if there is a way to set up a filter to
identify people with one or more shared events where the role for that
person is "unknown"?

Unsurprisingly, it does not appear to be possible in the events view,
since roles are not identified there, and if one goes to the person via
the reference in an attempt to check or edit the role the "Cannot edit
this reference" dialog appears. It is then possible to close the event
and actually edit the role for the person, but doing so for an event
[such as a census] shared with a number of people is unbelievably tedious.

In people view, there does not appear to be a custom filter that can
identify roles, except those set to "Primary"?

Event filters > People with the personal event > "Only include primary
participants" does appear to work [but by definition is not helpful for
this purpose], and fails if "Return values that do not match the filter
rules" is set [i.e. it returns only those very few people who have no
event for which they have a primary role].

One of the hazards of sharing events via the clipboard is that if the
user does not pay attention and edit the role prior to saving, it seems
to default to unknown? Is there a way of changing this?

It would be very helpful if it was possible to quickly identify all
people with an "unknown" value in any of their events.

cheers, Adrian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

prculley
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.


On Tue, Jun 27, 2017 at 9:08 PM, Adrian Davey <[hidden email]> wrote:
Can anyone please advise if there is a way to set up a filter to identify people with one or more shared events where the role for that person is "unknown"?

Unsurprisingly, it does not appear to be possible in the events view, since roles are not identified there, and if one goes to the person via the reference in an attempt to check or edit the role the "Cannot edit this reference" dialog appears. It is then possible to close the event and actually edit the role for the person, but doing so for an event [such as a census] shared with a number of people is unbelievably tedious.

In people view, there does not appear to be a custom filter that can identify roles, except those set to "Primary"?

Event filters > People with the personal event > "Only include primary participants" does appear to work [but by definition is not helpful for this purpose], and fails if "Return values that do not match the filter rules" is set [i.e. it returns only those very few people who have no event for which they have a primary role].

One of the hazards of sharing events via the clipboard is that if the user does not pay attention and edit the role prior to saving, it seems to default to unknown? Is there a way of changing this?

It would be very helpful if it was possible to quickly identify all people with an "unknown" value in any of their events.

cheers, Adrian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org

_haseventroleunknown.py (2K) Download Attachment
__init__.py (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

Doug-11
On 28/06/17 15:53, Paul Culley wrote:
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.

<snip>
Paul,
You don't say where to obtain the file "_haseventroleunknown.py". No attachments have come through to the mailing list.

Doug

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

Dave Scheipers
Hi Doug,

Paul attached the two files to his email.

On Thu, Jun 29, 2017 at 9:58 AM, Doug <[hidden email]> wrote:
On 28/06/17 15:53, Paul Culley wrote:
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.

<snip>
Paul,
You don't say where to obtain the file "_haseventroleunknown.py". No attachments have come through to the mailing list.

Doug

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

Dave Scheipers
In reply to this post by prculley
Hi Paul,

I moved the original _Iinit__.py to the desktop and then moved the two new files to "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person"

I am using 4.2.5 on Win10.

On launch of Gramps the attached error occurs.

2390: ERROR: grampsgui.py: line 323:
Gramps failed to start. Please report a bug about this.
This could be because of an error in a (third party) View on startup.
To use another view, don't load a Family Tree, change view, and then load your Family Tree.
You can also change manually the startup view in the gramps.ini file
by changing the last-view parameter.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 292, in __startgramps
    Gramps(argparser)
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 168, in __init__
    from . import viewmanager
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\viewmanager.py", line 67, in <module>
    from .plug import tool
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\__init__.py", line 31, in <module>
    from ._guioptions import make_gui_option, add_gui_options
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\_guioptions.py", line 61, in <module>
    from gramps.gen.filters import GenericFilterFactory, GenericFilter, rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\__init__.py", line 29, in <module>
    from ._filterlist import FilterList
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterlist.py", line 37, in <module>
    from ._filterparser import FilterParser
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterparser.py", line 36, in <module>
    from . import rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\__init__.py", line 85, in <module>
    from . import person
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person\__init__.py", line 112, in <module>
    from ._hassoundexname import HasSoundexName
ImportError: No module named 'gramps.gen.filters.rules.person._hassoundexname'

I put the original __init__ back and of course no problems loading



On Wed, Jun 28, 2017 at 10:53 AM, Paul Culley <[hidden email]> wrote:
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.


On Tue, Jun 27, 2017 at 9:08 PM, Adrian Davey <[hidden email]> wrote:
Can anyone please advise if there is a way to set up a filter to identify people with one or more shared events where the role for that person is "unknown"?

Unsurprisingly, it does not appear to be possible in the events view, since roles are not identified there, and if one goes to the person via the reference in an attempt to check or edit the role the "Cannot edit this reference" dialog appears. It is then possible to close the event and actually edit the role for the person, but doing so for an event [such as a census] shared with a number of people is unbelievably tedious.

In people view, there does not appear to be a custom filter that can identify roles, except those set to "Primary"?

Event filters > People with the personal event > "Only include primary participants" does appear to work [but by definition is not helpful for this purpose], and fails if "Return values that do not match the filter rules" is set [i.e. it returns only those very few people who have no event for which they have a primary role].

One of the hazards of sharing events via the clipboard is that if the user does not pay attention and edit the role prior to saving, it seems to default to unknown? Is there a way of changing this?

It would be very helpful if it was possible to quickly identify all people with an "unknown" value in any of their events.

cheers, Adrian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

prculley
I see Adrian did not reply to all;
He also had the issue with the 'HasSoundexName' rule.  I did not realize that that rule had not been added to Gramps 4.2.x versions, so did not remove it from the version of the '__init__.py' file I attached.  One of the perils of trying to help people without knowing the version of their software.

He solved the problem the same way I would have...

Comparing my original with your __init__py, I noted that yours contains two new lines at the end of the lists, i.e. adding the two filters HasSoundexName + HasEventRoleUnknown. So editing the new to remove the two lines that refer to HasSoundexName, and re-opening, everything seems to work. Touch wood, so far.

The filter is then accessible, and appears to work exactly as intended [and found 5 people I had missed in my manual trawling, including some very weird and previously undetected errors such as two marriages somehow shared as personal as well as family events].

I am guessing that the HasSoundexName filter is one new since 4.2.3?

I guess I need to figure out a way to make an addon that contains the filter, might avoid these issues.

Paul C.

On Thu, Jun 29, 2017 at 4:23 PM, Dave Scheipers <[hidden email]> wrote:
Hi Paul,

I moved the original _Iinit__.py to the desktop and then moved the two new files to "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person"

I am using 4.2.5 on Win10.

On launch of Gramps the attached error occurs.

2390: ERROR: grampsgui.py: line 323:
Gramps failed to start. Please report a bug about this.
This could be because of an error in a (third party) View on startup.
To use another view, don't load a Family Tree, change view, and then load your Family Tree.
You can also change manually the startup view in the gramps.ini file
by changing the last-view parameter.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 292, in __startgramps
    Gramps(argparser)
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 168, in __init__
    from . import viewmanager
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\viewmanager.py", line 67, in <module>
    from .plug import tool
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\__init__.py", line 31, in <module>
    from ._guioptions import make_gui_option, add_gui_options
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\_guioptions.py", line 61, in <module>
    from gramps.gen.filters import GenericFilterFactory, GenericFilter, rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\__init__.py", line 29, in <module>
    from ._filterlist import FilterList
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterlist.py", line 37, in <module>
    from ._filterparser import FilterParser
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterparser.py", line 36, in <module>
    from . import rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\__init__.py", line 85, in <module>
    from . import person
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person\__init__.py", line 112, in <module>
    from ._hassoundexname import HasSoundexName
ImportError: No module named 'gramps.gen.filters.rules.person._hassoundexname'

I put the original __init__ back and of course no problems loading



On Wed, Jun 28, 2017 at 10:53 AM, Paul Culley <[hidden email]> wrote:
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.


On Tue, Jun 27, 2017 at 9:08 PM, Adrian Davey <[hidden email]> wrote:
Can anyone please advise if there is a way to set up a filter to identify people with one or more shared events where the role for that person is "unknown"?

Unsurprisingly, it does not appear to be possible in the events view, since roles are not identified there, and if one goes to the person via the reference in an attempt to check or edit the role the "Cannot edit this reference" dialog appears. It is then possible to close the event and actually edit the role for the person, but doing so for an event [such as a census] shared with a number of people is unbelievably tedious.

In people view, there does not appear to be a custom filter that can identify roles, except those set to "Primary"?

Event filters > People with the personal event > "Only include primary participants" does appear to work [but by definition is not helpful for this purpose], and fails if "Return values that do not match the filter rules" is set [i.e. it returns only those very few people who have no event for which they have a primary role].

One of the hazards of sharing events via the clipboard is that if the user does not pay attention and edit the role prior to saving, it seems to default to unknown? Is there a way of changing this?

It would be very helpful if it was possible to quickly identify all people with an "unknown" value in any of their events.

cheers, Adrian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

Dave Scheipers
Success

If I were to edit _haseventroleunknown and were to change Line 57 and changed UNKNOWN to another role I could search for that? I have a couple custom roles that I misspelled but have not been able to find to fix.

Thanks Paul for all you do.




On Thu, Jun 29, 2017 at 5:38 PM, Paul Culley <[hidden email]> wrote:
I see Adrian did not reply to all;
He also had the issue with the 'HasSoundexName' rule.  I did not realize that that rule had not been added to Gramps 4.2.x versions, so did not remove it from the version of the '__init__.py' file I attached.  One of the perils of trying to help people without knowing the version of their software.

He solved the problem the same way I would have...

Comparing my original with your __init__py, I noted that yours contains two new lines at the end of the lists, i.e. adding the two filters HasSoundexName + HasEventRoleUnknown. So editing the new to remove the two lines that refer to HasSoundexName, and re-opening, everything seems to work. Touch wood, so far.

The filter is then accessible, and appears to work exactly as intended [and found 5 people I had missed in my manual trawling, including some very weird and previously undetected errors such as two marriages somehow shared as personal as well as family events].

I am guessing that the HasSoundexName filter is one new since 4.2.3?

I guess I need to figure out a way to make an addon that contains the filter, might avoid these issues.

Paul C.

On Thu, Jun 29, 2017 at 4:23 PM, Dave Scheipers <[hidden email]> wrote:
Hi Paul,

I moved the original _Iinit__.py to the desktop and then moved the two new files to "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person"

I am using 4.2.5 on Win10.

On launch of Gramps the attached error occurs.

2390: ERROR: grampsgui.py: line 323:
Gramps failed to start. Please report a bug about this.
This could be because of an error in a (third party) View on startup.
To use another view, don't load a Family Tree, change view, and then load your Family Tree.
You can also change manually the startup view in the gramps.ini file
by changing the last-view parameter.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 292, in __startgramps
    Gramps(argparser)
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\grampsgui.py", line 168, in __init__
    from . import viewmanager
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\viewmanager.py", line 67, in <module>
    from .plug import tool
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\__init__.py", line 31, in <module>
    from ._guioptions import make_gui_option, add_gui_options
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gui\plug\_guioptions.py", line 61, in <module>
    from gramps.gen.filters import GenericFilterFactory, GenericFilter, rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\__init__.py", line 29, in <module>
    from ._filterlist import FilterList
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterlist.py", line 37, in <module>
    from ._filterparser import FilterParser
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\_filterparser.py", line 36, in <module>
    from . import rules
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\__init__.py", line 85, in <module>
    from . import person
  File "C:\Program Files\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person\__init__.py", line 112, in <module>
    from ._hassoundexname import HasSoundexName
ImportError: No module named 'gramps.gen.filters.rules.person._hassoundexname'

I put the original __init__ back and of course no problems loading



On Wed, Jun 28, 2017 at 10:53 AM, Paul Culley <[hidden email]> wrote:
I'm not aware of any filter that can do what you described.  However, I created one that might assist you in what you want.

If you want to be a bit adventurous, I am attaching two files that implement a new filter rule.  This filter finds people that have one or more events with an 'unknown' event role.  It may be enough for your use standalone, or perhaps combined with other rules.

Back up your tree first, just in case something goes wrong.

I assume you are using Gramps 4.2.x or higher; this may work with something less, but I wouldn't know.
Both files need to be placed in your Gramps installation.  You need to find your "gramps\gen\filters\rules\person" directory.  On Windows it appears in someplace like "C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\gen\filters\rules\person" or maybe "C:\GrampsAIO64-4.2.5\gramps\gen\filters\rules\person".  On Linux it should be "/usr/lib/python3/dist-packages/gramps/gen/filters/rules/person".

If you have the right place it will have a lot of files starting with '_' that look like rule names.

In the future it would help if you mentioned your Gramps version and environment.

The "_haseventroleunknown.py" file is simply copied to the directory.  The "__init__.py" file replaces the one currently in that directory (you might want to rename the original first to save it if this doesn't work).

Restart Gramps and edit a new filter, this should be found under the 'Miscellaneous filters" in the Add rule dialog.

Good luck.

Paul C.


On Tue, Jun 27, 2017 at 9:08 PM, Adrian Davey <[hidden email]> wrote:
Can anyone please advise if there is a way to set up a filter to identify people with one or more shared events where the role for that person is "unknown"?

Unsurprisingly, it does not appear to be possible in the events view, since roles are not identified there, and if one goes to the person via the reference in an attempt to check or edit the role the "Cannot edit this reference" dialog appears. It is then possible to close the event and actually edit the role for the person, but doing so for an event [such as a census] shared with a number of people is unbelievably tedious.

In people view, there does not appear to be a custom filter that can identify roles, except those set to "Primary"?

Event filters > People with the personal event > "Only include primary participants" does appear to work [but by definition is not helpful for this purpose], and fails if "Return values that do not match the filter rules" is set [i.e. it returns only those very few people who have no event for which they have a primary role].

One of the hazards of sharing events via the clipboard is that if the user does not pay attention and edit the role prior to saving, it seems to default to unknown? Is there a way of changing this?

It would be very helpful if it was possible to quickly identify all people with an "unknown" value in any of their events.

cheers, Adrian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with filtering for roles

Doug-11
In reply to this post by prculley
On 29/06/17 22:38, Paul Culley wrote:
I see Adrian did not reply to all;
He also had the issue with the 'HasSoundexName' rule.  I did not realize that that rule had not been added to Gramps 4.2.x versions, so did not remove it from the version of the '__init__.py' file I attached.  One of the perils of trying to help people without knowing the version of their software.

Aaah! I'm running 4.2.6.

<snip>
when you've sorted it out to your satisfaction, could you tell us where it's to be found?
Thanks,

Doug


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Loading...