Project

General

Profile

Feature #12345

Updated by Marc Egger over 3 years ago

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 <notextile></notextile>*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: 
 !20210408-201711-420.png!

Back