Last modified: 2011-12-15 12:46:14 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 T35121, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33121 - Manipulating the sort order of main result column and of properties at the same time during queries
Manipulating the sort order of main result column and of properties at the sa...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-14 18:24 UTC by [[kgh]]
Modified: 2011-12-15 12:46 UTC (History)
3 users (show)

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


Attachments

Description [[kgh]] 2011-12-14 18:24:19 UTC
In case one would like to manipulate the sort order of the main result column one has just to define e.g. |order=asc or |order=desc

In case one would like to manipulate the sort order of a column containing a property one has just to define |sort=propertyname and order |order=optionname

It is not possible to combine this, since there is no option to define the main result column with the parameter |sort= As soon as a property is involved it is not possible to manipulate the sort order of the main result column. It would be a nice feature though
Comment 1 Jeroen De Dauw 2011-12-14 18:35:16 UTC
Quickly hacked something together. Seems to work. Can you verity? r106220
Comment 2 Jeroen De Dauw 2011-12-14 18:36:09 UTC
(This uses the empty value thing you mailed me as syntax, ie sort=,prop or sort=prop,)
Comment 3 [[kgh]] 2011-12-14 19:37:45 UTC
The syntax is nice since it is minimalistic. Your hack does not work since it ignores the second value provided with parameter sort. sort=,prop sorts by the main result column and ignores the prop and sort=prop, sorts by the prop and ignores the main result column
Comment 4 Jeroen De Dauw 2011-12-14 21:05:01 UTC
Err, you do need to provide matching order conditions. If you are sorting on 2 things, it needs 2 values.
Comment 5 [[kgh]] 2011-12-14 21:14:18 UTC
That is what I did, e.g. sort=,prop and order=desc,asc I will try tomorrow again to make sure. My server is down right now.
Comment 6 Jeroen De Dauw 2011-12-14 22:10:20 UTC
I tested a bit and cleaned up the code, which really was a mess (r106252). Seems to work just fine to me. 

Also found this was actually already possible, by specifying an order argument to much.

sort=Modification date
order=ASC, DESC

results in 
Modification date=ASC
Page=DESC

Now you have two ways of doing it :)
Comment 7 [[kgh]] 2011-12-15 12:46:14 UTC
Heiya, great and many kudos to you! I think, hopefully I am not wrong, there is one advantage with the new method: The method that already existed does not let you define that the main result column should be sorted first. This is different now.

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


Navigation
Links