-
Notifications
You must be signed in to change notification settings - Fork 33
Time series form bug #275
Comments
Once a dataset gets in this state, with mostly timeseries, and some individual resources it is no longer editable because validation stops you using two different resource types. Reseting to single entries, and then back to timeseries, it isn't straight-forward to replicate. |
I can't replicate this, but I have written a tool to fix the situation. Once a dataset gets in this state, trying to save it will cause problems as they don't show up in the time-series editor, and then cause a validation error (because it has both resource types). I've been unable to find out why this happened, and presumably nothing strange happened during the editing? I think this is a positive reason for having bug-reports direct from the person who experienced it. When going to the edit form, if we have time-series resources, then any individual_resources should be added to the bottom of the form. This will cause a validation error as the date field will be empty for these resources. But this is better than having hidden resources that stop you from editing. |
I just tried this on https://data.gov.uk/dataset/edit/financial-transactions-spend-data-bis#tab-data and it doesn't seem to be the case. Is this a PR you are preparing or haven't deployed yet? |
Ah, i just read you again - "should" as in a proposal, not something done. Sounds good! |
Adding the individual_resources in the timeseries table is straight-forward, in most cases the list will be empty, but when it isn't, it fills them in waiting for a date. However because the individual_resources are not [], the table is rendered with the data (but hidden) and causes a validation error. |
In cases where something has gone terribly wrong, we may end up with a tiemseries dataset, but with some individual_resources. This will cause a validation error. When this occurs, if we are in timeseries mode, we will include the individual_resources in the timeseries table so that the validation error is missing date, rather than a mixed resource type warning. We also do not populate the invidual_resource table, it will be sorted out on the client if we switch back, but adding it will trigger the wrong validation again.
This has been solved by some template-magic, and needs review. |
…package-edit Fixes #275 by importing individual resources into timeseries table.
The workaround #292 is great, but I think I've recreated the problem now.
There seems to be something in the resource saving stuff that only saves the resource if it has changed. However it ignores the date column. So if only the date has changed it doesn't save it. |
Found the fix on master ckan/ckan#2158 |
All deployed and BIS dataset saved ok. |
From James:
The text was updated successfully, but these errors were encountered: