ADX-1046 Persist validation metadata #110
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds two hidden inputs to the end of the resource edit form, one for validation_status and the other for validation_timestamp. This ensures that the metadata is persisted when the resource is updated through the UI.
At present, if metadata is edited without uploading a new file, the validation metadata is lost.
My primary concern about this PR is that it requires us to update the order which plugins are loaded. THis is because validation needs to be able to extend scheming templates, in order to keep this change in validation.
It could alternatively be moved to ckanext-unaids - this doesn't make as much logical sense to me, since the change is strictly scoped to only the validation work, but I can see that it may appear safer and therefore be a preferable option. Happy to hear what @tomeksabala and make the change as he sees fit.
Checklist
Put an
x
in the boxes that apply to this pull request (you can also fill these out after opening the pull request).You may not need to check all boxes.