https://bugzilla.wikimedia.org/show_bug.cgi?id=25768

           Summary: Date returned by query gets treated like string with
                    respect to sorting in table
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


I've got pages that each have multiple SIO records, and each record includes a
date (Status Report Date of type Date).  I was able to create a 2 column
summary table that lists each page along with the date of the newest record
with this query:
<pre>
{{#ask:[[Category:Status Report]] [[Has Contributor::{{PAGENAME}}]]
|?Has Effort=Effort
|link=none
|sort=Has Effort
|format=template
|template=display2ColTableViewStatusReportEntry
|intro={{display2ColSortTableHeader |col1=Effort |col2=Last Update}}
|outro={{displayTableFooter}}
}} 
</pre>

where Template:display2ColTableViewStatusReportEntry holds
<pre>

| [[{{{1}}}#{{#ask: [[Status Report Record::{{{1}}}]] |?Has Status Report Date=
|sort=Has Status Report Date |format=list |limit=1 |order=descending
|mainlabel=- |link=none |headers=hide |searchlabel= }}|{{{2}}} - View]]
| {{#ask: [[Status Report Record::{{{1}}}]] |?Has Status Report Date= |sort=Has
Status Report Date |format=list |limit=1 |order=descending |mainlabel=-
|link=none |headers=hide |searchlabel= }}
|-
</pre>

This results in a column sort table like
<pre>
      Effort             v Last Update 
Soda Project - View     4 November 2010
Burger Project - View     25 October 2010
Hot Dog Project - View     20 May 2010
Sandwich Project - View     19 October 2010
</pre>
The table shown above replicates one sorted by Last Update in descending order.
 It sorts alphanumerically rather than by date.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to