View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06507Bug reportsCentral participant databasepublic2012-09-20 14:12
Reporterlolo Assigned Tojcleeland  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00RC9 
Fixed in Version2.00+ 
Summary06507: Central Participant Database: admin language should not influence on the mapping of token attributes
Description

This is related to issues 06429, 06381 and 06506, but this one concerns the mapping of attributes.

When mapping participant attributes to token attributes (in the process of adding a participant to a survey), resulting token attribute descriptions are not filled if admin language is different from the participant attribute language.

If admin language and participant attribute language are the same (let's say english), then the resulting token attribute description is correctly populated with the attribute name.
For example, if original attribute name (in english) is 'Age', then the resulting token attribute will be called attribute_cpdb_xxxx and its description will be set to 'Age' (and 'Age' will appear as a column in the tokens list).

If, on the other hand, admin language is french, then when mapping the same attribute to a survey, the resulting token attribute will also be called attribute_cpdb_xxxx but the description will be empty (instead of using 'Age'). And as another result this token attribute will be displayed as attribute_cpdb_xxxx in the tokens list instead of 'Age'.

I think the right way to do this is to use the name of the attribute regardless of admin language (which is obviously currently used to determine the attribute description to use in the process). If the original attribute is multi-lingual (has n names for n languages), then the target survey language should be used to choose the right language description to copy over.

Steps To Reproduce
  • log as admin in english

  • go to cpdb

  • create attribute 'AGE' (=> default language for the attribute will be english)

  • add a participant to a survey 'A' (whatever language), and map attribute 'AGE' to token list
    => token attribute attribute_cpdb_xxxx will be created and its description will be set to 'Age'

  • log as admin in french

  • go to cpdb

  • add a participant to a survey 'B' (whatever language), and map attribute 'AGE' to token list
    => token attribute attribute_cpdb_xxxx will be created but its description will be empty

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120817
I will donate to the project if issue is resolvedYes
BrowserSafari 5.1.7 (Mac)
Database type & versionMysql 5.5.24
Server OS (if known)Linux 2.6.27.52
Webserver software & version (if known)Apache 2
PHP Version5.3.14

Users monitoring this issue

lolo

Activities

jcleeland

jcleeland

2012-09-11 08:42

reporter   ~20655

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

Related Changesets

LimeSurvey: Yii 5067b570

2012-09-10 23:40:24

jcleeland

Details Diff
Fixed issue 06507 - Central Participant Database: Admin language should not influence on the mapping of token attributes. System now checks if there is a matching description in the default language of the survey, then if not if there is a matching description in the currently selected admin language, then finally defaults to the first returned language. Affected Issues
06507
mod - application/models/Participants.php Diff File

Issue History

Date Modified Username Field Change
2012-08-20 00:44 lolo New Issue
2012-08-20 13:15 c_schmitz Status new => assigned
2012-08-20 13:15 c_schmitz Assigned To => jcleeland
2012-08-22 21:29 lolo Issue Monitored: lolo
2012-08-22 22:59 c_schmitz Category Tokens => Central participant database
2012-09-11 08:42 jcleeland Changeset attached => LimeSurvey Yii 5067b570
2012-09-11 08:42 jcleeland Note Added: 20655
2012-09-11 08:42 jcleeland Resolution open => fixed
2012-09-11 08:51 jcleeland Status assigned => resolved
2012-09-11 08:51 jcleeland Fixed in Version => 2.00+
2012-09-20 14:12 c_schmitz Status resolved => closed
2021-08-02 17:20 guest Bug heat 2 => 4