Last modified: 2008-11-10 18:49:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16097, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14097 - SMWRSSResultPrinter ignores query order when date is used
SMWRSSResultPrinter ignores query order when date is used
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Markus Krötzsch
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-12 19:21 UTC by Sergey Chernyshev
Modified: 2008-11-10 18:49 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to keep query sort order (666 bytes, patch)
2008-05-12 19:21 UTC, Sergey Chernyshev
Details

Description Sergey Chernyshev 2008-05-12 19:21:17 UTC
SMWRSSResultPrinter ignores query order when one of selected fields is date (renamed to "date") to be used as feed date.

It forces the order to be descending while some queries might rely on order to be ascending.

For example, I want to order my query to return 30 next conferences starting today and I limit the query to return 30 results and use "Start date" as a date like this:

{{#ask:[[Category:Conference]] [[Start date::+]] [[End date::>now]]
|?Start date=date
|sort=date
|order=asc
|format=rss
|searchlabel=RSS
|rsstitle=TechPresentations.org: Current and Upcoming Conferences
|rssdescription=Current and Upcoming conferences
|limit=30
}}

If I'll use "desc" order then it'll return 30 conferences starting with the last one as far in the future as system holds while I just need next 30 conferences starting today.

Since the order of items within RSS feed doesn't make any difference, I propose to keep query order.

Patch is attached.
Comment 1 Sergey Chernyshev 2008-05-12 19:21:56 UTC
Created attachment 4897 [details]
Patch to keep query sort order
Comment 2 Siebrand Mazeland 2008-08-11 11:05:24 UTC
Re-assign to extension developer for triage/comments.
Comment 3 Markus Krötzsch 2008-11-10 18:49:29 UTC
Applied patch, and inserted special case into SMWQueryProcessor to make DESC the default order for RSS (you usually want most recent items first there).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links