Role in event entry

Yes:

I’ve a lot of custom place types and when reimporting my backup they aren’t anymore in type list when creating a new place (but previously created places continue to have custom types I’ve created in the previous database)

Same thing for custom attribute names

And so on…

Rather, I think the unused custom entries are not exported, therefore they are not present in the file being imported.

If you wanted to create a “template” database with your custom types, I think it would need to include a few fake persons and events using those types.

Unless I am mistaken, @PLegoux is reporting that all custom entries in all drop-down lists are missing upon import. He has not reported that the entries actually attached to the various Gramps objects go missing after an import.

Yes. Which shows that the custom entries for the drop-down list get created at import and updated as new custom entries are created. This to make the point that these lists are not recreated every time Gramps launches.

So the question, why does PLegoux’s import not create these custom lists?

You are right, custom entries used by objects don’t miss after the import, they just miss in lists. It’s impossible to use them from dropdown lists, i hzve to recreate them. After that they are again available in lists.

The problem is that it does not appear in the role list and any unused custom roles are not exported/imported.

So, you can’t easily create a “template” database structure to use in multiple similar research scenarios.
e.g., if you want to create separate research for one part of your family or help out a friend.

A backup/restore should never exclude any user data, not data nor metadata, absolute every input into a database should be backed up, regardless of it is used or not… in an export, it is okay to limit what is exported to only used items, but even for an export there should be a way to export absolute everything that a user has put into the database.

1 Like

All custom value in any “enumeration” is not stored. Custom values, such as event role, are a pair (CUSTOM, string). This pair is sent to the role field in the event data structure.

The list presented in the drop-down menu is dynamically built to be presented to the user.

Another consequence of storage in event occurrence is you can’t change centrally the name of a role for another one, e.g. change “employee” to “employer”. You must do it to every event individually. Also, if I remember right (didn’t do it recently), you can’t filter on a specific custom role; you compare with CUSTOM, not with the string.

1 Like

I suppose we should either update the xml export/import to account for the lists in 5.2 or, if there is some reason they were deliberately left out, throw together a tool that could be used to export/import them separately.

1 Like

I can confirm that you cannot edit custom entries globally. The fact the lists are dynamically created on start up accounts for the random list order which was original point of this thread.

The Type Cleanup tool allows all mass manipulations of Roles. Including merging a custom role into another.

The “FilterRules” add-on rulebook collection for custom filters adds the option to search for Events having a selected Role. It includes Person and Family variants. (You can look at @prculley 's source to see how he does the compares.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.