medic/cht-stock-monitoring-workflow

Form getting broken after update

Opened this issue · 1 comments

Description

This is a Known issue: After adding an item, or any other action that update the existing forms, this form may be broken. To fix it, you need to try to repair manually by opening it with excel.

After some investigations, I found that the issue is coming from the settings sheet, especially the version column and in the cell where we set the formula to compute the version at every edition:

form_title form_id version
Form Title form_id [HERE]

I noticed that when the formula is simple like TODAY() or NOW() all is okay and the but when we have something more customized like using TEXT to format the date, exceljs complains about it and find it as invalid date… that’s where things break…

I’m digging into this, to make sure if the issue is about the complexity of the function or just some function not supported yet by exceljs and how to fix it…

An update:

To fix this, i though the path is to:

  • avoid touching exceljs for the moment
  • let settings sheet as it is without trying to compute (even if exceljs does it at the file loading, while writing it back, we just ignore the result of the computation)

cc: @inromualdo