-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reliable Country Selection #145
Comments
This can be solved by a script that I have created. See here. But this approach does not work for the countries. Because the countries will still be shown in the country combo box, when I unpublish them via the db. |
Yes, but currently it's not automated. ATM city data is being regenerated, so the list of cities has to be updated regularly. |
Any updates? How is synchronisation triggered? Manually or by a cron-job? In any case we could include @therter's BTW, the scripts should be made available in this GitHub repo under /scripts. |
I believe I found a possible solution for that problem. Instead of showing the overall taxonomy list for countries in the Study country field, I can place a View inbetween, which filters out unpublished countries. The result would be that only published Countries (for which available Cities exist) would remain. Tested it locally and it even worked fine together with the Business Rule function that handles the automated selection of cities/regions for the selected country. The necessary View is already available in the CSIS, so if @therter can provide such a publish/unpublish script for countries, we can use this approach to get a more reliable country selection. |
For now, it's set to be triggered manually by running the pull_content.sh script in the target docker environment, which runs the individual If configurations have changed (field & content type settings, Views, etc.), it's necessary to first synchronize the configuration, for which in turn it might be first necessary to run a composer update (in case new modules are used), so ideally during this whole process the site is put into "maintenance mode". All that considered I'm not a big fan of having a cron-job take care of this process.
I will put the mentioned script for the content synchronization in there as well. |
I have added the code for publishing/unpublishing countries to the function that publish/unpublish the cities. See here |
@patrickkaleta I have unpublished the country 'Andorra', but it is still shown in the combobox. |
3 similar comments
@patrickkaleta I have unpublished the country 'Andorra', but it is still shown in the combobox. |
@patrickkaleta I have unpublished the country 'Andorra', but it is still shown in the combobox. |
@patrickkaleta I have unpublished the country 'Andorra', but it is still shown in the combobox. |
@therter Sorry, for the misunderstanding. I prepared the necessary View but didn't switch to it until getting feedback. Now this new mechanism is active and in the Country selection box I can see roughly 30 countries. In the "Maintenance" overviews I've added a list of the Countries, so it's possible to view & change the status of the published/unpublished countries manually. |
Thanks! So this can be considered as done. |
Coming back to country selection, there are two usability issues:
The first, more serious one is related to the recalculation of HC-LE input layers: The city selection box must contain cities only, that are guaranteed to be available (recalculated) for screening. So we have to periodically re-generate the cities taxonomy as @therter described here. I wonder, if there is a possibility to a) automate or b) simplify this process? If we could unpublish or hide some taxonomy terms, then it would still be a manual task to update the list of cities as new cities are becoming available, but it's still more efficient than doing the complete import process again and again.
The second issue is not that critical (showstopper) but it could still become frustrating for users: There are many countries without supported cities, so they shouldn't be shown at all in the countries selection box for Automated Screening: Urban Infrastructure studies.
Originally posted by @p-a-s-c-a-l in #141 (comment)
The text was updated successfully, but these errors were encountered: