Closed muloem closed 8 years ago
@stellanl can you investigate to confirm whether or not this is still an issue and if yes please make appropriate fixes?
There are three things to consider:
Proposed solution: set an explicit text format on all non-number answer cells during export. It should be tested by some real users in case their workflow somehow depends on the current state.
It would be trivial to add some formatting style to the number cells. For example, "Never scientific notation". Has anyone expressed a wish in that regard?
As proposed by Josje, it would also be simple to indicate which fields must not be changed before an import, for example by by making them red-bordered or with pink background or in italics. You can also set a comment for a cell. This should be made as an option so it does not affect the raw data reports that are not used for data cleaning.
@stellanl That is a great idea, I did not know it was possible to hard code colour into Flow. We should create a separate issue for it as it is out of the scope of this one. And before we invest your time into making this fix, I think we should know whether users still edit the columns they should not edit, thus still have too many confusions with data cleaning. Let's consult with @Geerts
@Geerts I noticed that the 'rules of data cleaning' are not explicitly stated in Support - Can you add them under the Data cleaning article? Which rows you can not change? What question types you cannot edit?
Test plan:
test plan passes as described
@janagombitova is it an issue that the new format makes integers appear with a decimal point (and no 0 after it)?
@rumca does this happen when a user has a number question and submits the answer without decimals, signs? So, in your case the user typed in "2", "3".
If yes, then this is an issue. But I feel I am missing the full picture here
@janagombitova correct - I believe the new format assumes that all numerical responses will be decimals so always appends a '.' even if the response is '1'. Note that this is purely a visual thing in Excel though - the actual response doesn't have a decimal point.
@stellanl could you confirm?
Is that in Excel? I do not see that in LibreOffice Calc.
yes excel
EDIT - I see the following as the custom format for the cells in excel https://github.com/akvo/akvo-flow/blob/release/1.9.7/GAE/src/org/waterforpeople/mapping/dataexport/GraphicalSurveySummaryExporter.java#L338
Then I don't think there is a fix. There is only one way to specify "number, not in scientific format, show up to 3 decimals if necessary". Calc is smart enough to hide the decimal point/comma if all the decimals are 0. The underlying problem here is that our datatype Number is very broad/fuzzy, and other software has its own ideas about how to "do the right thing".
display issue has now been corrected for excel reports
I'll close this one for now until we get the release out, but I guess we'll have to reopen and come up with a different approach for fixing?
The original problem of this issue, text answers, is fixed. The added goal of improving number answers was rolled back and is likely unfixable. The extra goal of indicating, or even locking, fields that should be untouched for import is totally feasible but I think should be a separate issue.
@stellanl thank you for explaining. Mulo and me have chatted about this issue and agree that this issue can be closed for now and whatever comes up regarding spread sheet imports will be tackled on an ad hoc basis.
When importing data in a spreadsheet into the dashboard, cells containing only numbers are imported as numeric data regardless of the expected type of the of responses as defined by the question.
How to reproduce:
Expected results: strings containing numbers formatted in scientific notation for those with longer digits.
The correct behaviour should be that the type of the data imported is based on the type of data expected by the question associated with that column in the spreadsheet.