2010/11/22 Genearic <genearic@gmail.com>
Another thing: I do not know if it's a bug.
I try under Portable version (rel. 3.1.1-1).
I don't understand the difference between the
"Relationship Information" / "Type" and "Description" tab "Events".
They both correspond to the tag Gedcom (TTPE) but to import the behavior is different.
If tag is "Married" then no problem : "Married"
it appears in the 2 cells.
Else for "Unmarried", "Civil Union" and "Unknown" then only in
"Relationship Information" / "Type" and "Description" tab "Events" is empty.
Else
"Relationship Information" / "Type" is "Married" and "Description" tab "Events" is the "TYPE" value.
Can you explain the operation?

Events in Gedcom are a bit complicated in that several scenario's are possible.
They are mapped differently to Gramps events.
As support to some programs, the normal text is also parsed to see if it contains married and such, so as to be able to correctly import from those programs.

To fully understand the interplay if you want to dump access data to Gedcom for correct import, you should indeed have a look at the code in plugins/lib/libgedcom.py.
Method __family_even and map event_parse_tbl.
You see like that that if there is no TYPE ident, then type in gramps follows from the line.data after

So, Gramps determines if an event in GEDCOM maps to an internal event type of Gramps (the ones in the drop down list in an empty family tree), or to a custom event type in Gramps.
When it is determined it is an internal one, any text on the Gedcom line goes to the description. Otherwise the text is used to determine the type.

The relationship type in the family is determined from the parsed events in the family record. This keeps overwriting the previously set relationship type, so you must make sure the last event is the one you want. Relationship type only is set on predefined type MARR depending on the description given with the MARR type. The if structure is:

        if event.type == gen.lib.EventType.MARRIAGE:
            descr = event.get_description()
            if descr == "Civil Union":
                state.family.type.set(gen.lib.FamilyRelType.CIVIL_UNION)
                event.set_description('')
            elif descr == "Unmarried":
                state.family.type.set(gen.lib.FamilyRelType.UNMARRIED)
                event.set_description('')
            else:
                state.family.type.set(gen.lib.FamilyRelType.MARRIED)

Note the capitalization. This corresponds somewhat to http://homepages.rootsweb.ancestry.com/~pmcbride/gedcom/55gcch2.htm#EVENT_DESCRIPTOR
Yes, this seems a bit strange to me, but it is how I see import of GEDCOM works.
So you would need in gedcom (I think)

1 MARR
2 TYPE "Unmarried"

Benny

 


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Gramps-users mailing list
Gramps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users