civicrm/civicrm-core — pull request #3678 by kenwest (2014-07-16 04:10:18+00:00)
Title: CRM-14994 Fix activity type values

The 'value' column in the civicrm_option_value table is a varchar(512) so max() selects (in my database) '9' rather than '72'.

Looking at previous upgrade scripts that add an activity_type, the max(value) should be max(round(value)) so 'value' is treated as an integer.

This pull request assumes that changing the 4.5.alpha1 upgrade script is kosher. If not, perhaps the change should be be that the activity types 'Payment', 'Refund', and 'Change Registration' are UPDATEd in 4.5.beta2 to have better 'value' values.