BiologicalRecordsCentre / NPMS

NPMS
0 stars 0 forks source link

Square details per year -- auto-increment years included #297

Closed sacrevert closed 1 month ago

sacrevert commented 1 year ago

@andrewvanbreda to check whether applies to any other reports

Hard code multiple years (e.g. to 2050) and then filter user-drop down for selecting cut-off? Or some other work-around

andrewvanbreda commented 1 month ago

I cannot add columns automatically, but I have added up to 2035 as part of this issue https://github.com/BiologicalRecordsCentre/NPMS/issues/334

The extra columns will be easily hidden in page configuration without altering report.

andrewvanbreda commented 1 month ago

Hi @sacrevert @NPMSSupport As noted in https://github.com/BiologicalRecordsCentre/NPMS/issues/334, this report has now been updated to work up to 2035, just a simple page configuration (controlled from the page's Edit tab) can be set to show new years.

However I notice the report is quite slow (am not sure what it was like before). What could be contributing to this is the new years are actually being counted (even if the count is 0) but are just hidden from view. I might suggested the following

  1. The page currently has two reports on it, I might suggested putting the bottom grid on a separate page.
  2. Presumably the data for old years does not need counting as it won't change. Is one possibilityis for you to download those years, then remove old years from the report? We could reinstate them from the report's Github code history if they are really needed again in the future.
sacrevert commented 1 month ago

I forget exactly what this is counting, but, in general, data for older years can change sometimes. For example, when paper records from historic season get entered, or when data are reviewed and deleted for some reason. This is not likely to have a big effect, but it might introduce confusion later during reporting, if we have one number here and another from the database

andrewvanbreda commented 1 month ago

@sacrevert It counts samples for each year, we can leave it as it is for now. It just takes a minute or 2 to load.

andrewvanbreda commented 1 month ago

@sacrevert @NPMSSupport As noted this was coded as part of issue https://github.com/BiologicalRecordsCentre/NPMS/issues/334

To add extra years we can now simply make a simple change on the Edit Tab. If you don't mind have extra years on the grid, we can put a few years in the future on there so they are ready if you wish (they will simply count up to 0). @NPMSSupport let me know if you want that.

sacrevert commented 1 month ago

I think that you might as well add up to 2026 now tbh. Thanks!

andrewvanbreda commented 1 month ago

@sacrevert Done