BiologicalRecordsCentre / PoMS

repository for Pollinator Monitoring Scheme website
0 stars 0 forks source link

Date filters for reports should default to current year automatically #143

Closed andrewvanbreda closed 1 year ago

andrewvanbreda commented 2 years ago

See title.

Also manually change to 2022 until this change is deployed.

To be developed for EU PoMS and moved across

andrewvanbreda commented 2 years ago

@kitenetter I have shifted all the dates to 2022 manually for now

andrewvanbreda commented 1 year ago

@kitenetter I think this was raised after we had a discussion a while ago, and with the recent new year, I have been reminded to get around to this as might be useful for several projects. I have now deployed this. So the full results and admin results page default to 2023, and this is automatically added each year. While this currently doesn't return results for the page as we are at the beginning of the year, it does mean that we aren't hammering the server every time someone opens the page. Also it means when the grid opens, it is consistent with the message currently at the top of the page "0 counts submitted so far this year by 0 participants"

I have done something slightly different for the My Results, My Pan-trap pages. On these, a new year is automatically added to the filter, but the report is run for all time when the page is first opened. I think most people will expect to see all their results when screen is first opened. The My Results pages also don't have performance issues returning everything.

andrewvanbreda commented 1 year ago

Added to expert checking report pages also, as forgot to do those before.

kitenetter commented 1 year ago

@andrewvanbreda I think it is best not to do this for the expert checking pages, as we are often checking records from the year before. E.g. I recently set the default filter to be 2022 as we are currently checking the records from last year.

andrewvanbreda commented 1 year ago

Hi @kitenetter Manual year setting reinstated on expert pages. Set to 2022, but you will need to change this manually when you want it moved on.

andrewvanbreda commented 1 year ago

@kitenetter Or if you want it to tick over on a particular date, we can do that instead

kitenetter commented 1 year ago

Thanks @andrewvanbreda - the manual edit is fine for now at least, as it is only one or two of us that need to access these pages for UK PoMS, and as yet I don't think there is a requirement to use them more widely.