From a28dc41b7137ef20d6c2198bcdd18a23c241984b Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Tue, 28 Oct 2014 15:35:11 +0100 Subject: [PATCH] If no position specified put at the end --- .../services/work-packages-overview-service.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/angular/work_packages/services/work-packages-overview-service.js b/app/assets/javascripts/angular/work_packages/services/work-packages-overview-service.js index dfa8b02d16..7fee56dcfb 100644 --- a/app/assets/javascripts/angular/work_packages/services/work-packages-overview-service.js +++ b/app/assets/javascripts/angular/work_packages/services/work-packages-overview-service.js @@ -64,7 +64,11 @@ module.exports = function(WORK_PACKAGE_ATTRIBUTES) { var attributes = this.getGroupAttributes(groupName); if (attributes) { - attributes.splice(position, 0, attribute); + if (position) { + attributes.splice(position, 0, attribute); + } else { + attributes.push(attribute); + } } }, addGroup: function(groupName, position) {