Questions about form versioning introduced in cht-core 3.15 / cht-conf 3.10

cht-conf/395 added xmlVersion to forms. cht-core/7561 writes that xmlVersion as the form_version on data_records.

A couple questions

  1. There’s a comment in 7561 that says “It should be completely backwards compatible so it works even if the form was generated with an older version of cht-conf.QUESTION: if the form was generated with the older version of cht-conf, what can we expect on the data_record… will the CHT include the form_version, time, and sha256 keys with no values or do we not even include the form_version key?
  2. The name implies it, but just want to confirm this is only for reports… we do not store version of contact forms?
  3. This comment mentions that forms uploaded via the GUI will “store the date the form was uploaded as the version”. I understand that means we’ll have the unix date/time in the {xmlVersion,time} field. Will the sha256 key exist and be blank or will it not exist at all?
  4. After upgrading the instance to cht-core 3.15 and cht-conf to 3.10, you would have to re-upload all your forms to the instance and then all users would have to download the updated forms to start seeing the form_version on your data_records, correct?

In this case there will be no forum_version property at all. I think the “backwards compatible” comment was to indicate that cht-core v3.15.0 will behave the same as cht-core v3.14.0 if the form is not updated.

Contact forms are a subset of reports so I expected it to just work, but I’ve tested this out and while the contact form itself has the xml_version property, the contact created does not have the form_version property. I think this is an oversight and have raised an issue to fix this in a future version.

I’ve just tested and uploading using the App Management GUI did not update the xmlVersion property as expected so I don’t think this made it in to the release. I’ve raised an issue to fix this.

That’s right. Users who are offline won’t get the changes immediately so will still be creating reports based on the old form and/or the previous version of cht-core, so those will not have the form_version property. The property will only be generated on reports filed after they sync to get the updated form and cht-core code.

1 Like

Tagging @Victor_ZUGADI as he was specifically asking about the versioning functionality.

I think @bamatic was interested in this topic too!

Yes victor zugadi is also bamatic.

1 Like