Difference between revisions of "Add Types to the SyncAssociation Gramplet"

From Gramps
Jump to: navigation, search
(Created page with "{{subst:Template:How_do_I}}")
 
m (See also)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Languages}}
 
  
== See also ==
+
How do I add a new relationship Type to the [[Addon:SyncAssociation|SyncAssociations]] tool?
*Feature documentation:[[Start_with_Genealogy|Start with Genealogy]]
+
== Not for the casual user ==
 +
The list of Association Types was not designed to be changed via the interface. (It was intended for a specific Association and does not '''''have''''' any interface.) But you can manually change the Gramplet code as a temporary hack.  Unfortunately, the next time that Gramplet is updated, any temporary hacks will be wiped out.
 +
 
 +
To add more ‘official’ reciprocal relationship will take time. The quickest turnaround would be for users to manually change the Association Types in the system and, once they have verified the the Types as functioning, then submit the patched line of associations as an Enhancement Request.
 +
 
 +
== What variations of Syncs can be added? ==
 +
Associations can be symmetrical or reciprocal.  That is to say, the relationship is described the same way from either side (co-workers) or inverse/mirror of one another (guardian and ward)
 +
 
 +
As an example, perhaps you want to log the Association of a [https://wikipedia.org/wiki/Namesake Namesake] to their [https://wikipedia.org/wiki/Eponym Eponym].  The Junior-Senior namesake relationships are implied via the Name Suffix and loosely refined via the Family relationship.  But namesakes that skip a generation (or are honoring a famous person/thing) are more easily tracked via Associations.  It sure would be nice for there to be less work to set the Reciprocal Association.
 +
 
 +
When considering Associations, note that they do not have a datespan. So logged Associations should probably be limited to those that are expected to be lifelong.
 +
== The Hack ==
 +
If you go to line 57 of syncAssociations.py you will see:
 +
 
 +
<pre>
 +
ASSOC_LOOKUP = {
 +
"cM": "cM",
 +
"DNA": "DNA",
 +
"Godfather": "Godchild",
 +
"Godmother": "Godchild",
 +
"Landlord": "Tenant"
 +
}
 +
</pre>
 +
 
 +
You need to add lines with a similar format (quoted string then colon then quoted string then comma)
  
*[[Gramps_Glossary#active_person|Active Person]] Gramps Glossary definition
+
Once the new Associations Types have tested and work as expected, submit an [https://gramps-project.org/bugs/my_view_page.php enhancement request].
  
*based on the [https://sourceforge.net/p/gramps/mailman/gramps-users/ Gramps-users] archived threads:
+
== See also ==
:[https://sourceforge.net/p/gramps/mailman/message/36617953/ The Group As name override]
+
* Gramps {{man version}} Manual - [[Gramps_{{man version}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Associations| Entering and Editing: Associations]]
:[https://sourceforge.net/p/gramps/mailman/search/?q=%22unify+similar+surmanes+%3F%3F%22&mail_list=all unify similar surmanes &#91;sic&#93; thread]
+
*[[Roles,_Relationships_%26_Associations|Roles, Relationships & Associations]]  
:[https://sourceforge.net/p/gramps/mailman/search/?q=%22Group+As+name%22 threads with "Group As name"]
+
*[[Addon:DNASegmentMapGramplet|DNA Segment Map Gramplet]]
  
  
 
{{DEFAULTSORT:How do I...new category location|noreplace}}
 
{{DEFAULTSORT:How do I...new category location|noreplace}}
[[Category:Tutorial]]
+
[[Category:Addons]]
[[Category:WikiContributors]]
 
 
[[Category:How do I...]]
 
[[Category:How do I...]]
 
+
 
+
<!--
 
<div style="background:lightcyan">
 
<div style="background:lightcyan">
  
Line 148: Line 170:
 
{{man note|Example Note |Notes text.}}
 
{{man note|Example Note |Notes text.}}
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 +
 +
-->

Revision as of 05:54, 24 October 2020

How do I add a new relationship Type to the SyncAssociations tool?

Not for the casual user

The list of Association Types was not designed to be changed via the interface. (It was intended for a specific Association and does not have any interface.) But you can manually change the Gramplet code as a temporary hack. Unfortunately, the next time that Gramplet is updated, any temporary hacks will be wiped out.

To add more ‘official’ reciprocal relationship will take time. The quickest turnaround would be for users to manually change the Association Types in the system and, once they have verified the the Types as functioning, then submit the patched line of associations as an Enhancement Request.

What variations of Syncs can be added?

Associations can be symmetrical or reciprocal. That is to say, the relationship is described the same way from either side (co-workers) or inverse/mirror of one another (guardian and ward)

As an example, perhaps you want to log the Association of a Namesake to their Eponym. The Junior-Senior namesake relationships are implied via the Name Suffix and loosely refined via the Family relationship. But namesakes that skip a generation (or are honoring a famous person/thing) are more easily tracked via Associations. It sure would be nice for there to be less work to set the Reciprocal Association.

When considering Associations, note that they do not have a datespan. So logged Associations should probably be limited to those that are expected to be lifelong.

The Hack

If you go to line 57 of syncAssociations.py you will see:

ASSOC_LOOKUP = {
"cM": "cM",
"DNA": "DNA",
"Godfather": "Godchild",
"Godmother": "Godchild",
"Landlord": "Tenant"
}

You need to add lines with a similar format (quoted string then colon then quoted string then comma)

Once the new Associations Types have tested and work as expected, submit an enhancement request.

See also