NERC-CEH / fit-count-app

Fit Count App & Website
Apache License 2.0
0 stars 0 forks source link

FIT Count website default parameter values #172

Closed kitenetter closed 1 year ago

kitenetter commented 1 year ago

For the pages that allow viewing and downloading of count data (e.g. https://fitcount.ceh.ac.uk/regional-results), we currently have a default filter setting for year 2022:

idlist= searchArea= year_sort_order=-2022 filtered_survey_id=

Is it possible to make the default year the current year, i.e. so that we don't have to manually update the year? If you can let me know how this is specified I can edit the page.

andrewvanbreda commented 1 year ago

@kitenetter I have checked the code. This has already been coded for UKPoMS and is working there. So in theory all that needs to happen is we remove the "year_sort_order=-2022" on the Fit Count site and it should start working, it is even using the same report as UKPoMS to generate the drop-down. However I just tried and it isn't working. Am not sure why not working, will look again when get a second. However for now feel to change the parameter to year_sort_order=-2023

(note the inclusion of the minus sign is not a typo, but relates to how the the sorting of the years works)

kitenetter commented 1 year ago

@andrewvanbreda for now I have edited the parameters so that the defaults are year 2023 and FIT Count app:

year_sort_order=-2023 filtered_survey_id=641

Relates to #173

andrewvanbreda commented 1 year ago

@kitenetter Have switched the filtered_survey_id=641 parameter so it is in the "Preset Parameters" box above. This stops it showing and runs the report against that survey.

kitenetter commented 1 year ago

Excellent! I think that was already the case for the other page (https://fitcount.ceh.ac.uk/my-results) so the survey filtering issue can be closed.

andrewvanbreda commented 1 year ago

@kitenetter Yes have checked the other one, the other report works a bit differently but yes is limited to 641 only, going by the param config

andrewvanbreda commented 1 year ago

Hi @kitenetter Fixed. The problem was it needed some javascript to get it working also. Close if happy. (I guess you won't be able to tell if this worked until the new year!....although you will see it is working even though the year_sort_order parameter is no longer supplied, that is really your main sign it is operating automatically)

kitenetter commented 1 year ago

Thanks - closing.