-
Notifications
You must be signed in to change notification settings - Fork 6
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
Todos sure up #4196
Todos sure up #4196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I was aware there was a visible flag on Observation but seems to be there since 2019. The changes make sense for consistency. I can see the flag is being used when displaying lists of observations (e.g. timeline, interventions controller, etc) but its not used in calculating scores? I guess that's deliberate to allow items to be hidden but the overall score to be retained?
What I don't get is why if an observation is this calendar year then it is removed but in a previous calendar year it is made invisible. If it were to be to retain scores, don't our scoreboards only count for this calendar year anyway? |
In my local DB there are only 14 observations that are not visible. It seems like it was intentional to add this functionality but can't work out why. It's a bit inconsistent. |
You can retrieve older versions of scoreboards, e.g I can only think the visibility is there to allow scores to be retained, as the observation values are still counted. This was the original commit. It's obviously been pretty rare to retrospectively remove items. When we're recently done updates because, e.g a school has recorded an activity multiple times, we just set the observation to zero. Which is better than removing or hiding anything. |
Ahh ok, didn't realise you could view a previous year's scoreboard, that would make more sense now. But yes, seems like behaviour we perhaps don't need anymore if we are setting score to zero if we don't want it to count... Anyways, will merge in. It's been useful to discuss this. Thanks! |
Spotted a couple of things that needed changing after a good poke around.
Firstly when observations are 'removed' via the frontend (via the ObservationRemoval service), if not in current academic year, visible is set to false, rather than it being removed. If they are in this academic year, they are destroyed, which automatically removes completed todos etc, which is how I assumed it worked all the time. So now this takes note of the visible flag in a number of places and removes completed todos when visible is set to false.
Also made sure that when picking the latest recording for a todo, there is a possibility that more than 1 recording occurs on the same day. Added code to make sure we always pick the last one created. It probably would have done this anyway, just wanted to be intentional.