View Issue Details

IDProjectCategoryView StatusLast Update
07741Bug reportsSurvey editingpublic2013-04-23 16:30
Reporteralibert Assigned Toc_schmitz  
PrioritynormalSeveritytweak 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary07741: Order auf Labsets in Labelsetpicker
DescriptionLabelsets in DropdownListbox in /limesurvey/index.php/admin/labels/sa/view and in Labelsetpicker are sorted by the "lid".
Should be orderd by "label_name".
Additional InformationPossible Fix in:
limesurvey\application\helpers\common_helper.php on Line 7289

/**
* Returns labelsets for given language(s), or for all if null
*
* @param string $languages
* @return array
*/
function getLabelSets($languages = null)
{

    $clang = Yii::app()->lang;
    $languagesarray = array();
    if ($languages)
    {
        $languages=sanitize_languagecodeS($languages);
        $languagesarray=explode(' ',trim($languages));
    }

    $criteria = new CDbCriteria;
// Add this Line to sort by "label_name"
    $criteria->order = "label_name";
//----------------------------------------
    foreach ($languagesarray as $k => $item)
    {
        $criteria->params[':lang_like1_' . $k] = "% $item %";
        $criteria->params[':lang_' . $k] = $item;
        $criteria->params[':lang_like2_' . $k] = "% $item";
        $criteria->params[':lang_like3_' . $k] = "$item %";


        $criteria->addCondition("
        ((languages like :lang_like1_$k) or
        (languages = :lang_$k) or
        (languages like :lang_like2_$k) or
        (languages like :lang_like3_$k))");
    }

    $result = Labelsets::model()->findAll($criteria);
    $labelsets=array();
    foreach ($result as $row)
        $labelsets[] = array($row->lid, $row->label_name);
    return $labelsets;
}
TagsNo tags attached.
Complete LimeSurvey version number (& build)130325
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMYSQL 5.5.16
Server OS (if known)Windows 2003 Server
Webserver software & version (if known)Apache/2.2.21
PHP VersionPHP 5.3

Activities

alibert

alibert

2013-04-08 11:32

reporter  

labelsets.PNG (9,917 bytes)   
labelsets.PNG (9,917 bytes)   
alibert

alibert

2013-04-08 11:33

reporter  

labelsets2.PNG (15,287 bytes)   
labelsets2.PNG (15,287 bytes)   
alibert

alibert

2013-04-08 11:36

reporter   ~24915

Last edited: 2013-04-08 11:36

View 2 revisions

Title of Bugreport is not very clear.
What i meant is the sort order in the Listboxes (Lablesetpicker)

c_schmitz

c_schmitz

2013-04-21 22:02

administrator   ~25010

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

c_schmitz

2013-04-23 16:30

administrator   ~25093

2.00+ Build 130424 release

Related Changesets

LimeSurvey: master 9133a4ff

2013-04-21 20:02:23

c_schmitz

Details Diff
Fixed issue 07741: Order of label sets in label set picker Affected Issues
07741
mod - application/helpers/common_helper.php Diff File
mod - application/views/admin/labels/labelbar_view.php Diff File
mod - application/views/admin/labels/labelsetsbar_view.php Diff File

Issue History

Date Modified Username Field Change
2013-04-08 11:32 alibert New Issue
2013-04-08 11:32 alibert File Added: labelsets.PNG
2013-04-08 11:33 alibert File Added: labelsets2.PNG
2013-04-08 11:36 alibert Note Added: 24915
2013-04-08 11:36 alibert Note Edited: 24915 View Revisions
2013-04-21 21:53 c_schmitz Assigned To => c_schmitz
2013-04-21 21:53 c_schmitz Status new => assigned
2013-04-21 22:02 c_schmitz Status assigned => resolved
2013-04-21 22:02 c_schmitz Fixed in Version => 2.00+
2013-04-21 22:02 c_schmitz Resolution open => fixed
2013-04-21 22:02 c_schmitz Changeset attached => LimeSurvey master 9133a4ff
2013-04-21 22:02 c_schmitz Note Added: 25010
2013-04-23 16:30 c_schmitz Note Added: 25093
2013-04-23 16:30 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing