When Ok is not Okay

There are several places in Gramps where OK has commitment issues. (In databases, the process of storing and properly cross-referencing a record is ‘committing’ the change.)

Being aware of them and adjusting your workflow can avoid bad commitments and redundant warnings.

Most seems to be trying to Commit a database change out of the order anticipated. There are bug reports on these but, since being procedurally disciplined avoids these problems and THAT is something at which good programmers excel, those bugs are likely to stay low priority.

The OK keybinding is a particularly vulnerable feature. (This might be Windoze specific since the wiki doesn’t list an OK keybinding for Linux or macOS… which is odd since Tognazzini’s Human Interface Guidelines has mandated a OK keybinding on mac for 40 years.) If there is a validation that occurs after a data entry field has a change, then using the OK keybinding before hitting tab or enter will leave those validation processes open & unready for committing the change to the database.

Some concrete examples are:

  • when creating a new person, the statistical Gender guessing occurs when moving from the Given name field to to another field. So just typing ‘John’ and the OK keybinding leaves the Gender as Unknown so the commit is left guessing and goes psychotic.
  • When entering a multiple surname, the data-entry validates the row was not left blank and creates a space to store that additional row. If the OK keybinding is used while still initializing data in the Surname column, there’s no row available to commit that data.

So, hitting a tab before the the OK keybinding lets the evaluations occur and Gramps is readied to commit.


Likewise, using the OK (both by keybinding and clicking the button) on a dialog that has a spawned dialog still open will fail to commit the final changes in the spawned window. The objects are typically created but the relationships are not committed, thus orphaning the newborn object.

Concrete examples are:

  • When adding a new family, the new family is created around the active person (where the Active Person is inserted as a child or parent) in an Edit Family dialog. Adding a new related person (the other parent, some offspring, or a sibling) spawns an Edit Person dialog. If you choose the OK in the Edit Family dialog before chosing the OK in the spawned Edit Person dialog, Gramps will warn that there is unsaved data and allow you to save (the spawned) anyway. But the Parent window has already committed before the spawned Person was created. So that spawned Person is orphaned.
  • The same thing happens for adding a new Event (or Citation, Note, Media) via the Edit Person dialog. The new object is not connected to the Person if you click OK in the Edit Person dialog before the OK in the Spawned dialog. The Spawned object will be created if you choose the Warning’s Save anyway … but the spawned object will be orphaned.

So, clicking on a spawned dialog OK before the OK in the ‘parent’ dialog avoids this commitment issue.