View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
06568Bug reportsStatisticspublic2012-09-24 14:07
Reporteruser21846Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00RC9 
Fixed in Version2.00+ 
Summary06568: Date filters do not seem to work in statistics reporting
Description

When viewing responses it would be good to get graphs for how the results from a certain date or range of dates appear, but currently when a date is set in the date filter (e.g. for submission date equals) and view stats is selected, the results always seem to show that no responses were received for that date, even if there were valid responses on that date. Also when returning from the statistics box to the general filters box on the Quick statistics page, the entered date seems to have been corrupted and replaced by something else.

Steps To Reproduce

When viewing a survey with responses from several different days, select "Responses and statistics"->"Get statistics from these responses" to get to the Quick statistics page for the survey. Here enter a date in the general filters->Submission date->Date equals input box, e.g. for a date when you know there were responses. Then click on the view stats and it seems to always show that no responses were received on that date. This seems to happen for the other 2 date filters too.

Additional Information

I debugged this a bit and think it is related to the following code in
application/helpers/admin/statistics_helper.php

being called twice when view stats is called - could it be that the value of the post parameter gets converted twice which messes things up?

            //check for datestamp of given answer
            elseif (substr($pv, 0, 9) == "datestamp")
            {
                //timestamp equals
                $formatdata=getDateFormatData(Yii::app()->session['dateformat']);
                if (substr($pv, -1, 1) == "E" && !empty($_POST[$pv]))
                {
                    $datetimeobj = new Date_Time_Converter($_POST[$pv], $formatdata['phpdate'].' H:i');
                    $_POST[$pv]=$datetimeobj->convert("Y-m-d");
                    $selects[] = Yii::app()->db->quoteColumnName('datestamp')." >= '".$_POST[$pv]." 00:00:00' and ".Yii::app()->db->quoteColumnName('datestamp')." <\

= '".$_POST[$pv]." 23:59:59'";
}

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)120817
I will donate to the project if issue is resolvedNo
BrowserChrome / Firefox
Database type & versionMySQL 5.1
Server OS (if known)CentOS 5
Webserver software & version (if known)Apache 2.2.3
PHP Version5.2.14

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-09-21 11:23

administrator   ~20748

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9519

c_schmitz

c_schmitz

2012-09-21 11:23

administrator   ~20749

Your assumption was right. The first call was not really needed.
Thank you!

c_schmitz

c_schmitz

2012-09-24 14:07

administrator   ~20779

2.00+ 120924 released. Please update manually as ComfortUpdate is not working yet.

Related Changesets

LimeSurvey: master d3955aa2

2012-09-21 02:23:54

c_schmitz

Details Diff
Fixed issue 06568: Date filters do not seem to work in statistics reporting Affected Issues
06568
mod - application/controllers/admin/statistics.php Diff File
mod - application/views/admin/export/statistics_view.php Diff File

Issue History

Date Modified Username Field Change
2012-09-20 10:36 user21846 New Issue
2012-09-21 11:23 c_schmitz Assigned To => c_schmitz
2012-09-21 11:23 c_schmitz Status new => assigned
2012-09-21 11:23 c_schmitz Changeset attached => LimeSurvey master d3955aa2
2012-09-21 11:23 c_schmitz Note Added: 20748
2012-09-21 11:23 c_schmitz Resolution open => fixed
2012-09-21 11:23 c_schmitz Note Added: 20749
2012-09-21 11:23 c_schmitz Status assigned => resolved
2012-09-21 11:23 c_schmitz Fixed in Version => 2.00+
2012-09-24 14:07 c_schmitz Note Added: 20779
2012-09-24 14:07 c_schmitz Status resolved => closed