#1653 closed defect (fixed)
jarabe.journal.model defaults to invalid order_by=-mtime
Reported by: | sascha_silbe | Owned by: | sascha_silbe |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Trivial | Keywords: | r+ |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | New |
Description
jarabe.journal.model.find() sets the default value of order_by to -mtime, but the data store only recognizes +/-timestamp. Since we usually want the most recent entry to come first +timestamp should be the default, matching the data store default. So we can either fix it to read +timestamp or just drop it. The result is the same in all cases; dropping it means less code to execute, less opportunity to be wrong in the future and slightly less data to transfer / parse.
Attachments (1)
Change History (6)
comment:1 Changed 13 years ago by sascha_silbe
comment:2 Changed 13 years ago by sascha_silbe
- Keywords r? added
- Owner changed from tomeu to sascha_silbe
- Status changed from new to accepted
Feel free to move to 0.90 as it doesn't affect behaviour.
comment:3 Changed 13 years ago by erikos
- Keywords r+ added; r? removed
- Milestone changed from Unspecified by Release Team to 0.88
Sascha verified that this code is not called anymore. But it might be confusing, so let's remove it before it does any harm ;p
comment:4 Changed 13 years ago by sascha_silbe
- Resolution set to fixed
- Status changed from accepted to closed
Pushed as 28bec448c7b17937d20f96ae8a132de05b6e5a9c, thanks!
Actually it's even wrong twice: the data store expects order_by to be a list (but only uses the first element), so interprets "-mtime" as just "-".