You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried with 2.6.2 and 2.8.0 hosted in my company and with 2.6.6 directly on demo.ckan.org
Please describe the expected behaviour
In my company we have the need of executing massive updates of datasets (by using package_patch) without verifying if the edit is already present (e.g. "blank" edit) in the dataset currently being edited, and we need to know if action package_patch has been executed without errors. So I expect, for every dataset, to get the field metadata_modified updated in both api package_show and package_search, and to see this edit in the dataset page in the field Last Updated and in the activity stream.
Please describe the actual behaviour
If the update is already present in the dataset (e.g. I send the string "prova" as title but the dataset has already the title "prova"), only metadata_modified of package_show get updated but NOT the one of package_search. Plus, the field Last Updated in dataset page get updated regardless of the "blank" edit, but i don't get a new entry in activity stream.
I consider this behaviour a bit schizophrenic, if ckan doesn't want to trace "blank" edit, why update only certain fields and not all the fields involved? The field metadata_modified get updated only in one api (package_show) and not in the corresponding one (package_search), this is is misleading.
I think the simplest approach would be to move the metadata_modified field update to be triggered just before the search index update code so it doesn't get called when the db values aren't changing.
@lucapelizzo do you have any interest in submitting a PR? I'd be happy to help point you in the right direction.
I never did something similar before, if you can give me some technical hints (which files have to be edited??) I can give it a try. I can run test only on a 2.6.2 version.
CKAN Version if known (or site URL)
I tried with 2.6.2 and 2.8.0 hosted in my company and with 2.6.6 directly on demo.ckan.org
Please describe the expected behaviour
In my company we have the need of executing massive updates of datasets (by using package_patch) without verifying if the edit is already present (e.g. "blank" edit) in the dataset currently being edited, and we need to know if action package_patch has been executed without errors. So I expect, for every dataset, to get the field metadata_modified updated in both api package_show and package_search, and to see this edit in the dataset page in the field Last Updated and in the activity stream.
Please describe the actual behaviour
If the update is already present in the dataset (e.g. I send the string "prova" as title but the dataset has already the title "prova"), only metadata_modified of package_show get updated but NOT the one of package_search. Plus, the field Last Updated in dataset page get updated regardless of the "blank" edit, but i don't get a new entry in activity stream.
I consider this behaviour a bit schizophrenic, if ckan doesn't want to trace "blank" edit, why update only certain fields and not all the fields involved? The field metadata_modified get updated only in one api (package_show) and not in the corresponding one (package_search), this is is misleading.
What steps can be taken to reproduce the issue?
I created this dataset in demo.ckan.org https://demo.ckan.org/dataset/provaprovaprova-354 , as you can see in https://demo.ckan.org/api/3/action/package_show?id=provaprovaprova-354 the field metadata_modified is "2018-09-04T08:41:53.107569", but if I use package_search https://demo.ckan.org/api/3/action/package_search?q=&include_private=true&sort=metadata_created+desc&rows=999 and I search for id: "5637ef6e-115c-424b-b76c-27a9c3e7fc96" (corresponding to previous dataset) I get metadata_modified: "2018-09-04T08:34:18.862575".
The text was updated successfully, but these errors were encountered: