i found JForm::setFieldAttribute method to not evaluate if passed in values for a specific attribute shall be merged into existing values or instead replace them, which forces one to write longer setFieldAttribute() statements just not to loose existing values. For example:
$form->setFieldAttribute(
'description',
'labelclass',
$form->getFieldAttribute('description', 'labelclass', '', 'params') . '
new1 new2 new3 ...',
'params'
);
Note the 3rd param. This is pretty long, isn't it? And since it is not always only one single attribute that might be passed in, this param might become much longer. Wouldn't you agree that it is much easier to write:
$form->setFieldAttribute(
'description',
'labelclass',
'new1 new2 new3 ...',
'params'
);
We can easily shorten it by changing the related JForm method to evaluate this circumstance and either merge or replace the related attribute.
There already is an entry at the joomlacode bug tracker along with detailed testing instructions.
Same as #3143 ??