View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
16390Feature requestsRemoteControlpublic2020-06-16 19:19
ReporterDenisChenu Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary16390: Allow filtering when export reponse
DescriptionWhen using API for export reponse : we can

1. Export all
2. export from /to
3; export by tokens

But in general : we need conditionnal export
Additional InformationPlugin ready : https://gitlab.com/SondagesPro/RemoteControl/extendRemoteControl/-/tree/exportReponseFiltered

Easy to adapt :

````
        $aSFilters = array();
        if(!empty($aFilters)) {
            foreach($aFilters as $column => $value) {
                if(in_array($column,$aFields)) {
                    if(is_array($value)) {
                        $quotedvalues = array_map(
                            function($val) {
                                return Yii::app()->getDb()->quoteValue($val);
                            },
                            $value
                        );
                        $aSFilters[] = Yii::app()->getDb()->quoteColumnName($column)." IN (".implode(",",$values).")";
                    } else {
                        $aSFilters[] = Yii::app()->getDb()->quoteColumnName($column)." LIKE ".Yii::app()->getDb()->quoteValue($value);
                    }
                }
            }
        }
````

and
`$sTempFile = $oExport->exportResponses($iSurveyID, $sLanguageCode, $sDocumentType, $oFormattingOptions, $aSFilters);`

But i don't want to take time to create a test :D
TagsNo tags attached.
Bug heat0

Relationships

related to 15999 closedollehar Extend RemoControl function list_participants to allow basic conditions 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-06-16 19:17 DenisChenu New Issue
2020-06-16 19:19 DenisChenu Relationship added related to 15999