-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fixes #45 - training queue waiting times #46
Fixes #45 - training queue waiting times #46
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.
Can you add this up to days, months, and years? I feel like that will be more versatile than stalling out at days.
I think for the purposes of the training queue, maxing out at days is more helpful, as waiting lists in some divisions can last over a year. For ATC staff trying to see how quickly a waiting list is moving, seeing several students waiting for "1 year" isn't particularly useful, whereas seeing the exact number of days allows this kind of analysis without needing to export data from Hayya's database. I have added a new parameter to the relativeTime function which allows specification of a maximum unit, so allows flexibility where the function is used in other areas. I have maxed it out at "days" on the training queues and "hours" on the online users view. |
Ok.. that sounds good to me. |
I’ll disable codestyle for this PR- give me a second |
3e96dd0
to
c9b65d6
Compare
…owing-as-unknown-when-greater
Fixes #45. Behaviour was caused by relativeTime function returning "Unknown" if the number of days was greater than the maximum (30 days). This PR sets the maximum to Infinity. Having the function return "weeks", "months" or "years" seems less helpful for list tracking purposes.