QRealTime icon indicating copy to clipboard operation
QRealTime copied to clipboard

Layer form field order not respected in 'make online'

Open yorkfrog opened this issue 3 years ago • 0 comments

Describe the bug Using a spatialite layer and the QGis 'drag & Drop designer', field ordering is not maintained in the generated Kobo form. It appears that the order of the fields in the Kobo form is taken from the underlying data scr (e.g. spatialite table) rather than the current layer form.

To Reproduce

  • create a SpatiaLite table with 3 fields.
  • In the layer D&D form designer, move the 3rd field to the top of the form.
  • QRT makeonline
  • In the exported Kobo form, see that the 3rd field appears at the bottom of the form.

Expected behavior

  • In the exported Kobo form, I expect to see the 3rd field appear as the first field as defined in the D&D form designer.

Screenshots The QGis LAyer Form design : image

The exported Kobo form: image

please complete the following information):

OS: Win 10
QGIS Version : 3.10.14
Plugin Version: QrealTime 3.15

Additional context QRT Export Log:

2021-02-15T16:42:48 INFO not writing fieldsNone 2021-02-15T16:42:48 INFO 'type'None 2021-02-15T16:42:48 INFO getFieldModelTextEdit 2021-02-15T16:42:48 INFO getFieldModelTextEdit 2021-02-15T16:42:48 INFO getFieldModelTextEdit 2021-02-15T16:42:48 INFO fieldDict[{'type': 'geopoint', 'required': True, 'label': 'Point Location'}, {'name': 'f234567890', 'label': 'f234567890', 'type': 'text'}, {'name': 'f2345678901', 'label': 'f2345678901', 'type': 'text'}, {'name': 'new-field', 'label': 'new-field', 'type': 'text'}] 2021-02-15T16:42:48 INFO Payload= {'uid': 'test-size-2.1.1', 'name': 'test-size-2.1.1', 'asset_type': 'survey', 'content': '{"survey": [{"type": "geopoint", "required": true, "label": "Point Location"}, {"name": "f234567890", "label": "f234567890", "type": "text"}, {"name": "f2345678901", "label": "f2345678901", "type": "text"}, {"name": "new-field", "label": "new-field", "type": "text"}], "choices": []}'} 2021-02-15T16:42:53 INFO KoboToobox{"url":"https://kf.kobotoolbox.org/api/v2/assets/a2qVQM3KsKKTuxvtWiKdnH/permission-assignments/p4Nd4v7dN6QRzXg5UQVU8t/","user":"https://kf.kobotoolbox.org/api/v2/users/AnonymousUser/","permission":"https://kf.kobotoolbox.org/api/v2/permissions/view_submissions/","label":"View submissions"}

yorkfrog avatar Feb 15 '21 16:02 yorkfrog