Project

General

Profile

Actions

Feature #12345

closed

Form File Sync "Lite"

Added by Marc Egger about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Carsten Rose
Target version:
Start date:
08.04.2021
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
Vote:

Description

Habe mir Gedanken gemacht zum Form sync, falls wir ihn irgendwann wieder aktivieren wollen.

Durch das Requirement, dass Datenbank-Forms und Form Files zu jeder Zeit perfekt synchronisiert sind, ist der sync code sehr verstrickt.

Auch wenn der Form sync stabil ist, würde ich davon abraten ihn wieder zu aktivieren, so wie er jetzt ist.

Stattdessen würde ich eine "Lite" Version vorschlagen.

Vorschlag für eine "Lite" Variante des Form File Sync die einfacher nachzuvollziehen und stabiler ist:

  • Add sync button for all forms and for single form to form-editor report (see mockup)
    • Edit Marc: I don't think the single form sync button is necessary.
  • Sync is performed only manually when a developer presses the sync button
  • Sync buttons are only active when file and database for that form of for all forms respectively are out of sync
  • When the sync button is pressed QFQ decides whether to import the file or export the form from database by comparing the fileStats column with the current file stats
    • the newer one is kept 
    • file stats column format: {"modified":1617090967,"size":26634,"inode":1310848}
  • Every time the form-editor report is loaded QFQ checks whether any forms are out of sync. If yes then an empty file named FORM_OUT_OF_SYNC is created in qfqProject.
    • As soon as all forms are back in sync the file is removed (the next time form-editor report is loaded)
    • The existence of this file can be checked in our bash sync scripts to warn the user

Advantage of this approach:

  • There is a lot less hidden magic
  • The code involved is a lot less intrusive, if this feature breaks everything else still works
  • Added features to QFQ are a lot less likely to break this feature than the original form sync
  • We can still decide to offer an auto sync option where sync is executed automatically every time the form-editor report is opened
    • this is still a lot less complex than the current form sync

Ich würde den Aufwand für dieses Feature auf ca. 2 Arbeitstage für mich schätzen. Vieles ist schon da. Weniger "neues" als der json form-editor benötigt hat.

Mockup:


Files

20210408-201711-420.png View 20210408-201711-420.png 55.7 KB Marc Egger, 08.04.2021 20:17
Actions #1

Updated by Marc Egger about 3 years ago

  • Description updated (diff)
Actions #2

Updated by Carsten Rose about 3 years ago

  • Status changed from Feedback to Closed
  • Target version changed from next5 to 21.4.0
Actions

Also available in: Atom PDF