summaryrefslogtreecommitdiffstats
path: root/client/components/activities
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-03-16 22:43:47 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-03-16 22:49:45 +0100
commitd01fccd9497120613bf2c0b986963e67e7f3d6fa (patch)
tree0ad6cc465e427397b7125bb8f3ff0f0719d28c0b /client/components/activities
parent4cd0d1c3971f001eccf023bb84f1bee113fed215 (diff)
downloadwekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.tar.gz
wekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.tar.bz2
wekan-d01fccd9497120613bf2c0b986963e67e7f3d6fa.zip
- Fix card copy & move between boards with customFields
- Fix card copy & move between boards with labels with same name - Fix activities for labels when copying and moving card - Fix activities for customFields when copying and moving card
Diffstat (limited to 'client/components/activities')
-rw-r--r--client/components/activities/activities.jade9
-rw-r--r--client/components/activities/activities.js8
2 files changed, 16 insertions, 1 deletions
diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade
index 949400f6..54066da8 100644
--- a/client/components/activities/activities.jade
+++ b/client/components/activities/activities.jade
@@ -99,6 +99,9 @@ template(name="boardActivities")
else
| {{{_ 'activity-added' memberLink cardLink}}}.
+ if($eq activityType 'moveCardBoard')
+ | {{{_ 'activity-moved' cardLink oldBoardName boardName}}}.
+
if($eq activityType 'moveCard')
| {{{_ 'activity-moved' cardLink oldList.title list.title}}}.
@@ -135,7 +138,7 @@ template(name="cardActivities")
p.activity-desc
+memberName(user=user)
if($eq activityType 'createCard')
- | {{_ 'activity-added' cardLabel list.title}}.
+ | {{_ 'activity-added' cardLabel listName}}.
if($eq activityType 'importCard')
| {{{_ 'activity-imported' cardLabel list.title sourceLink}}}.
if($eq activityType 'joinMember')
@@ -176,6 +179,10 @@ template(name="cardActivities")
| {{_ 'activity-sent' cardLabel boardLabel}}.
if($eq activityType 'moveCard')
| {{_ 'activity-moved' cardLabel oldList.title list.title}}.
+
+ if($eq activityType 'moveCardBoard')
+ | {{{_ 'activity-moved' cardLink oldBoardName boardName}}}.
+
if($eq activityType 'addAttachment')
| {{{_ 'activity-attached' attachmentLink cardLabel}}}.
if attachment.isImage
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 81995221..cbdd776e 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -74,6 +74,8 @@ BlazeComponent.extendComponent({
lastLabel(){
const lastLabelId = this.currentData().labelId;
+ if (!lastLabelId)
+ return;
const lastLabel = Boards.findOne(Session.get('currentBoard')).getLabelById(lastLabelId);
if(lastLabel.name === undefined || lastLabel.name === ''){
return lastLabel.color;
@@ -84,11 +86,15 @@ BlazeComponent.extendComponent({
lastCustomField(){
const lastCustomField = CustomFields.findOne(this.currentData().customFieldId);
+ if (!lastCustomField)
+ return null;
return lastCustomField.name;
},
lastCustomFieldValue(){
const lastCustomField = CustomFields.findOne(this.currentData().customFieldId);
+ if (!lastCustomField)
+ return null;
const value = this.currentData().value;
if (lastCustomField.settings.dropdownItems && lastCustomField.settings.dropdownItems.length > 0) {
const dropDownValue = _.find(lastCustomField.settings.dropdownItems, (item) => {
@@ -135,6 +141,8 @@ BlazeComponent.extendComponent({
customField() {
const customField = this.currentData().customField();
+ if (!customField)
+ return null;
return customField.name;
},