What's the URL of the page containing the problem?
https://student-sonar.herokuapp.com/status
What steps will reproduce the problem?
- Log in to Student Sonar.
- Navigate to "My Status Reports".
What is the expected output? What do you see instead?
I expect the status reports to be sorted chronologically. Instead, they appear to be randomly sorted (see the attached screenshot).
What operating system are you using? What browser?
OS: Windows 10.
Browser: Chrome.Please provide any additional information below.
David Trowbridge pushed an update recently (see: https://reviews.reviewboard.org/r/7696/diff/1#index_header) that solved a similar issue elsewhere on Student Sonar. I would guess that this is the same sort of problem. That is, instead of:
const dueDates = application.get('statusReportDueDates') .filter(d => intersectionExists(d.get('show_to_groups'), attrs.groups)) .sort((a, b) => a.date - b.date);there should probably be something like:
const dueDates = application.get('statusReportDueDates') .filter(d => intersectionExists(d.get('show_to_groups'), attrs.groups)) .sort((a, b) => a.get('date').isBefore(b.get('date')) ? -1 : 1);