Merge Objects
merge_objectsMerge a confirmed duplicate record into the record to keep, moving its details and links in one transaction and deleting the duplicate. Use only after verifying both records describe the same entity.
Instructions
Merge a duplicate into the record to keep when both describe the same person, family, event, place, source, citation, note, media object or repository: Gramps Web moves the duplicate's details and every link to it onto the kept record and deletes the duplicate, all in one transaction. Call it only after the user confirmed that the two records are the same; read both with get_object first, and find candidates with search or list_objects. The kept record keeps its own fields: a person's primary name, gender, birth and death, an event's type, date, place and description, a source's title, a citation's page, date and source, a note's text, a media object's file. The duplicate's name becomes an alternate name of the kept person or place, and its events, children, parents, notes, citations, media, attributes and tags are added. Merging two people also merges a family the duplicate had with the same partner (mergeFamilies); merging two families merges their different fathers into one person and their different mothers into one person. Gramps refuses to merge spouses or a parent with their child, and tags cannot be merged. Clients that support it show the user a confirmation dialog first; action declined or cancelled means nothing changed. Returns action merged with the kept and deleted records and the transaction number: undo_change with it restores the duplicate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keepHandle | Yes | The record that stays and keeps its own fields. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. | |
| objectType | Yes | Type of both records: person, family, event, place, source, citation, note, media or repository. | |
| fatherHandle | No | Families only: the father who stays when the two families name different fathers, who then become one person. The father of either family; default is the kept family's father, or the duplicate's when the kept family has none. | |
| motherHandle | No | Families only: the mother who stays when the two families name different mothers, who then become one person. The mother of either family; default is the kept family's mother, or the duplicate's when the kept family has none. | |
| mergeFamilies | No | People only: true (default) also merges a family the duplicate had with the same partner as one of the kept person's families; false keeps both families. Ignored for other types. | |
| duplicateHandle | Yes | The duplicate: its details and links move to the kept record, then it is deleted. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. |