Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#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)

1653.patch (952 bytes) - added by sascha_silbe 11 years ago.
jarabe.journal.model: remove invalid order_by=-mtime

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by sascha_silbe

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 "-".

Changed 11 years ago by sascha_silbe

jarabe.journal.model: remove invalid order_by=-mtime

comment:2 Changed 11 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 11 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 11 years ago by sascha_silbe

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:5 Changed 7 years ago by dnarvaez

  • Milestone 0.88 deleted

Milestone 0.88 deleted

Note: See TracTickets for help on using tickets.