Fix user custom fields of timelines

pull/1073/head
Till Breuer 11 years ago
parent cfe6f8fecb
commit 4852a14d01
  1. 11
      app/assets/javascripts/angular/helpers/components/custom-field-helper.js

@ -52,12 +52,13 @@ angular.module('openproject.helpers')
case 'bool':
return CustomFieldHelper.booleanCustomFieldValue(value);
case 'user':
if (users && users[value]) {
// try to look up users
return users.name;
// not the nicest piece of code, but to be discarded soon
if (users) {
// try to look up users, assume value is an id
if (users[value]) return users[value].name;
} else {
// return user id
return value.name;
// assume value is already a user object
if (value) return value.name;
}
break;
case 'int':

Loading…
Cancel
Save