2008/11/24 Ken B <ken.mymail@gmail.com>
Yes, I get the expected output after making the suggested changes;

Ok,

The problems I see by looking at the code are:

1. class IsDescendantOfFilterMatch(IsDescendantOf, MatchesFilter):
there is no need to inherit from MatchesFilter. That filter is only used to prepare the db. So it can be changed to 
class IsDescendantOfFilterMatch(IsDescendantOf);

2. The code defaults to not adding the original filter, however this cannot be guaranteed as persons can be present in different ways. Hence this filter can only work if it is 'Inclusive' for the original. Hence, prepare should not have
        try:
            if int(self.list[1]):
                first = 0
            else:
                first = 1
        except IndexError:
            first = 1

but I believe:

        first = 0   #only inclusive works reliably for filter match, otherwise
                      # people of the original filter can be in if descendant of somebody else
                      # of the same filter. This might confuse user

3. list[1] is used but there is no list[1]

Benny



In the meantime, you could open up the file
 Filters/Rules/Person/_IsDescendantOfFilterMatch.py
and before line 74 filt.reset() add the line
print self.map
It's late and my brain is not working. I'll create a filter in using the example database in the morning and file a bug report.
Ken.


Benny Malengier wrote:
 The filter looks good, but I see that the IsDescendantOfFilterMatch has some logical errors (??) and is not inclusive, so the people who are in the filter you match do not show in the result under some circumstances. This could explain some things, but you would have some output.

Can you create a filter that has this behaiviour on the example database distributed with GRAMPS and submit a bug entry?

In the meantime, you could open up the file
 Filters/Rules/Person/_IsDescendantOfFilterMatch.py
and before line 74 filt.reset() add the line
print self.map

to see if theere is some output.
Benny


2008/11/24 Ken B <ken.mymail@gmail.com>
Hi Benny,

    Thanks for your prompt response. I hope this is the section that you mean,

----------- First Filter -----------

  <filter name="5th_G_A" function="or" comment="Ancestors of 5th Generation GGG Parents">
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
    <rule class="IsAncestorOf">
      <arg value="XXXXX"/>
      <arg value="1"/>
    </rule>
  </filter>

---------- Second Filter -----------

  <filter name="5th_G_eol_D" function="or" comment="Decendants of end of line Ancestors">
    <rule class="IsDescendantOfFilterMatch">
      <arg value="5th_G_A"/>
    </rule>
  </filter>

Ken.


Benny Malengier wrote:
It is hard to know what you did.
Perhaps paste the relevant content from the file ~/.gramps/custom_filters.xml so it is clear what you activated. Remove private info first though.

Benny

2008/11/24 Ken B <ken.mymail@gmail.com>
Hello All,

    I am trying to filter all people (ancestor and descendants) based on great great grand parents.

    I have created a filter for the <ancestors of> ggg parents including the original person, with the option "At least one rule must apply". When tested this produces the desired output.
    Then created a filter for <descendants of filter match> using the original filter,
with the option "At least one rule must apply". There is no output from this filter when tested.
    Have I set this up correctly, or is this just not possible to do ?

Thanks,
Ken.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-users mailing list
Gramps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-users mailing list
Gramps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users