-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmptyValues updates should work (also for files from 0.18.1) #5347
Conversation
Make sure changes are updated in database Also prepare the upgradeDB function in databaseInterface for future changes
Could you provide a reproduction path of what this PR solves? |
For a bonus, I think it crashes if you try to then set empty values on the column but I might've misremembered. |
It also makes sure the database is upgraded at the right moment |
When loading a 0.18.1 JASP file, the workspace default values are empty. They should be set to the preferences empty values as default (since there is no workspace empty values in 0.18.1). In DataSet::setEmptyValuesJson, there was already an handling to overcome this issue, but as DataSet has no access to the PreferencesModel object, it was depending of setting the _defaultEmptyvalues property just after the DataSet was created. But as DataSet might be deleted and created several times, the _defaultEmptyvalues is not always set. So just make it a static property, so that it just has to be set once.
There was still a problem: the workspace empty values are empty when a 0.18.1 JASP file is loaded. I have just added a commit to solve this. |
So approved and it can be merged? |
* EmptyValues updates should also work for files from 0.18.1 Make sure changes are updated in database Also prepare the upgradeDB function in databaseInterface for future changes * Workspace emptyvalues must have default values When loading a 0.18.1 JASP file, the workspace default values are empty. They should be set to the preferences empty values as default (since there is no workspace empty values in 0.18.1). In DataSet::setEmptyValuesJson, there was already an handling to overcome this issue, but as DataSet has no access to the PreferencesModel object, it was depending of setting the _defaultEmptyvalues property just after the DataSet was created. But as DataSet might be deleted and created several times, the _defaultEmptyvalues is not always set. So just make it a static property, so that it just has to be set once. --------- Co-authored-by: boutinb <[email protected]>
Make sure changes are updated in database
Also prepare the upgradeDB function in databaseInterface for future changes
I stopped working on the refactor of EmptyValues, thatll be for post-0.18.2
This should at least make empty values per column etc work for files from 0.18.1 (and perhaps more)