View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
04182Bug reportsOtherpublic2010-03-09 23:17
Reporterwrenchpilot Assigned Toc_schmitz  
PrioritylowSeveritytweak 
Status closedResolutionfixed 
Product Version1.87+ 
Fixed in Version1.87+ 
Summary04182: Survey listing - incorrect sorting
Description

On the admin page:
/admin/admin.php?action=listsurveys

The table sorting for:
Full, partial, and total responses do not sort correctly.
Also, the date sort only works correctly (in terms of the sort making sense) if the user sets their date format preferences to "yyyy-mm-dd".

Steps To Reproduce

This is happening because some of the other surveys in the list are not active and/or have a null value for responses. In turn, the jQuery table sorter is detecting that the column is of type 'text' instead of type 'digit' and causing the sort to be incorrect.

Additional Information

The screen shot attached shows the "Total responses" column sorted in descending order. As you can see, it's completely wrong.

Possible Fix:
Force jQuery to treat the response column as 'digit'.
Edit file:
/admin/scripts/listsurveys.js

Replace with the following code:
[code]
// $Id: templates.js 7699 2009-09-30 22:28:50Z c_schmitz $
// based on TTabs from http://interface.eyecon.ro/

$(document).ready(function(){
$(".listsurveys").tablesorter({sortList: [[2,0]],
headers: {7:{sorter:'digit'}, // Full responses
8:{sorter:'digit'}, // Partial Responses
9:{sorter:'digit'} // Total Responses
}
});
});
[/code]

TagsNo tags attached.
Attached Files
sorting.png (40,748 bytes)   
sorting.png (40,748 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)8453
I will donate to the project if issue is resolved
BrowserFirefox 3.6
Database type & versionmysql 5.0.77
Server OS (if known)rhel5.3
Webserver software & version (if known)apache
PHP Version5.1.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2010-03-08 21:31

administrator   ~11257

Great fix, thank you very much, wrenchpilot!

Issue History

Date Modified Username Field Change
2010-03-05 21:34 wrenchpilot New Issue
2010-03-05 21:34 wrenchpilot File Added: sorting.png
2010-03-08 08:29 user372 Status new => assigned
2010-03-08 08:29 user372 Assigned To => c_schmitz
2010-03-08 21:31 c_schmitz Note Added: 11257
2010-03-08 21:31 c_schmitz Status assigned => resolved
2010-03-08 21:31 c_schmitz Fixed in Version => 1.87+
2010-03-08 21:31 c_schmitz Resolution open => fixed
2010-03-09 23:17 c_schmitz Status resolved => closed