Jump to content

Sync Errors: Difference between revisions

From Resco's Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{WIP}}
{{WIP}}
Merge config is an upcoming feature that allows you to configure the merge form used for resolving synchronization conflicts.
Merge config is an upcoming feature that allows you to configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs.
 
To enable this advanced merge configuration, you have to set [[conflict resolution]] to '''Manual Action''' and upload a file with configuration details.


# Edit an [[app projects|app project]] and select '''[[Configuration]]''' from the '''Project''' menu.
# Edit an [[app projects|app project]] and select '''[[Configuration]]''' from the '''Project''' menu.
# Click '''Merge Config''' to display the editor.
# Click '''Merge Config''' to display the editor.
# Do stuff.
# Enter the configuration.
# Save all changes.
# Save all changes.
== Sample configuration ==
<syntaxhighlight lang="text">
#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins
</syntaxhighlight>
== Configuration details ==
Each line in the file corresponds to an entity name or field name.
* Lines starting with <code>#;</code> define the entity.
* Lines beneath an entity are the fields.
# Start with defining the entity for that you want to set up per-field merge configuration. Use the format <code>#;entity_name</code>, for example, <code>#;contact</code>.
# Next, list some or all fields. One field per line, in the format <code>field_name;merge_behavior</code>, for example, <code>address1_city;devicewins</code>
# Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.
The following conflict resolution behavior is supported:
* serverwins: server version is taken, device version is overwritten. For example: <code>address1_country;serverwins</code>
* devicewins: device version is taken, server version is overwritten. For example: <code>address1_city;devicewins</code>
* (field not listed in the file): user can select the preferred version manually
Additionally, two flags control the behavior of the merge form:
* hide: the field is not displayed on the merge form; the configured behavior applies automatically. For example: <code>fax;hide;devicewins</code>
* readonly: the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: <code>phone;readonly;devicewins</code>


[[Category:Synchronization]]
[[Category:Synchronization]]

Revision as of 05:46, 15 June 2022

Warning Work in progress! We are in the process of updating the information on this page. Subject to change.

Merge config is an upcoming feature that allows you to configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs.

To enable this advanced merge configuration, you have to set conflict resolution to Manual Action and upload a file with configuration details.

  1. Edit an app project and select Configuration from the Project menu.
  2. Click Merge Config to display the editor.
  3. Enter the configuration.
  4. Save all changes.

Sample configuration

#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins

Configuration details

Each line in the file corresponds to an entity name or field name.

  • Lines starting with #; define the entity.
  • Lines beneath an entity are the fields.
  1. Start with defining the entity for that you want to set up per-field merge configuration. Use the format #;entity_name, for example, #;contact.
  2. Next, list some or all fields. One field per line, in the format field_name;merge_behavior, for example, address1_city;devicewins
  3. Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.

The following conflict resolution behavior is supported:

  • serverwins: server version is taken, device version is overwritten. For example: address1_country;serverwins
  • devicewins: device version is taken, server version is overwritten. For example: address1_city;devicewins
  • (field not listed in the file): user can select the preferred version manually

Additionally, two flags control the behavior of the merge form:

  • hide: the field is not displayed on the merge form; the configured behavior applies automatically. For example: fax;hide;devicewins
  • readonly: the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: phone;readonly;devicewins