Skip to content
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

Timesheet entries not listed in order during time entry session #55

Closed
mcalligator opened this issue Aug 10, 2022 · 2 comments · Fixed by #56
Closed

Timesheet entries not listed in order during time entry session #55

mcalligator opened this issue Aug 10, 2022 · 2 comments · Fixed by #56
Projects

Comments

@mcalligator
Copy link

In a time entry session established using timeld open <timesheet-name>, the entries are ordered by Entry #, but in alphabetical, rather than numeric order.

Whilst they are correctly grouped by Session, within that they need to be ordered numerically.

@gsvarovsky
Copy link
Member

Interestingly, the entries are actually wholly unordered by the app – what you see is the raw ordering from quadstore:

reportEntriesProc({ selector, format }) {
// TODO: selectors
return new ResultsProc(
this.meld.read({
'@describe': '?entry',
'@where': { '@id': '?entry', '@type': 'Entry' }
}).consume,
getSubjectFormat(format, this.getSession));
}

I agree that we ought to order nicely of course.

Ideally we would add an @order clause to the query, which would require support from m-ld.

In the meantime we can just order the results manually in the app.

@mcalligator
Copy link
Author

From a developer's perspective, it would be a reasonable expectation that the underlying query mechanism return results in a specified order - particularly if there is a large number of them, and pagination is being used. So I agree; this should be supported in m-ld.

@gsvarovsky gsvarovsky added this to In progress in timeld Aug 11, 2022
@gsvarovsky gsvarovsky linked a pull request Aug 12, 2022 that will close this issue
@mcalligator mcalligator moved this from In progress to Done in timeld Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
timeld
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants