modxbot / migrate

A testground for migrating issues and other such fun
0 stars 0 forks source link

Replace Gender INT(1) with CHAR(1) #1990

Open wshawn opened 16 years ago

wshawn commented 16 years ago

wshawn created Redmine issue ID 1990

Just wondering why we are having to code a gender translation function when we can simply be just be placing M, F, or U (Male, Female, Unknown) Multiple snippets all having to do something like Scotty's function stringForGenderInt($genderInt) { if ($genderInt == 1) { return 'Male'; } else if ($genderInt == 2) { return 'Female'; } else { return 'Unknown'; } } Is a little over the top. Simply: if ModX is pulling information it should correctly present a workable, straight forward, and meaningful result which corresponds to the criteria. Sex: M F makes sense Sex: 1 2 does not

mitch-zz commented 15 years ago

mitch submitted:

Note that M and F only make sense in English. Concerning the code example I normally use something like this: // Have this table somewhere $genderName [0] = 'Unknown'; $genderName [1] = 'Male'; $genderName [2] = 'Female'; // When the gender text is needed just use $genderName [$genderInt] ;

oori commented 14 years ago

oori submitted:

Note: using revo beta5 rev6103 (out of svn): in manager --> Gender can not be modified related with the above issue. manager -> user -> gender -> save POST as Male/Female (i.e. strings) and is never converted to 1/2 later on, so this field remains empty.

modxbot commented 14 years ago

tracker_integration submitted:

A Pivotal Tracker story has been created for this Issue: http://www.pivotaltracker.com/story/show/3030128