2
0
Эх сурвалжийг харах

Add popup and changelog for linked card fixes.

Lauri Ojansivu 5 жил өмнө
parent
commit
ea74a34d72

+ 2 - 0
CHANGELOG.md

@@ -27,6 +27,8 @@ and adds the following translations:
 
 
 and fixes the following bugs:
 and fixes the following bugs:
 
 
+- [Fix Deleting linked card makes board not load](https://github.com/wekan/wekan/issues/2785).
+  Thanks to marc1006 and xet7.
 - [Fix getStartDayOfWeek once again](https://github.com/wekan/wekan/pull/3061).
 - [Fix getStartDayOfWeek once again](https://github.com/wekan/wekan/pull/3061).
   Thanks to marc1006.
   Thanks to marc1006.
 - [Fix shortcuts list and support card shortcuts when hovering
 - [Fix shortcuts list and support card shortcuts when hovering

+ 12 - 1
client/components/cards/cardDetails.js

@@ -960,7 +960,18 @@ BlazeComponent.extendComponent({
           if (Cards.find({ linkedId: this._id }).count() === 0) {
           if (Cards.find({ linkedId: this._id }).count() === 0) {
             Cards.remove(this._id);
             Cards.remove(this._id);
           } else {
           } else {
-            // TODO popup...
+            // TODO: Maybe later we can list where the linked cards are.
+            // Now here is popup with a hint that the card cannot be deleted
+            // as there are linked cards.
+            // Related:
+            //   client/components/lists/listHeader.js about line 248
+            //   https://github.com/wekan/wekan/issues/2785
+            const message = `${TAPi18n.__(
+              'delete-linked-card-before-this-card',
+            )} linkedId: ${
+              this._id
+            } at client/components/cards/cardDetails.js and https://github.com/wekan/wekan/issues/2785`;
+            alert(message);
           }
           }
           Utils.goBoardId(this.boardId);
           Utils.goBoardId(this.boardId);
         }),
         }),

+ 11 - 1
client/components/lists/listHeader.js

@@ -238,9 +238,19 @@ Template.listMorePopup.events({
       allCardIds.map(_id => Cards.remove(_id));
       allCardIds.map(_id => Cards.remove(_id));
       Lists.remove(this._id);
       Lists.remove(this._id);
     } else {
     } else {
-      // TODO popup with a hint that the list cannot be deleted as there are
+      // TODO: Figure out more informative message.
+      // Popup with a hint that the list cannot be deleted as there are
       // linked cards. We can adapt the query above so we can list the linked
       // linked cards. We can adapt the query above so we can list the linked
       // cards.
       // cards.
+      // Related:
+      //   client/components/cards/cardDetails.js about line 969
+      //   https://github.com/wekan/wekan/issues/2785
+      const message = `${TAPi18n.__(
+        'delete-linked-cards-before-this-list',
+      )} linkedId: ${
+        this._id
+      } at client/components/lists/listHeader.js and https://github.com/wekan/wekan/issues/2785`;
+      alert(message);
     }
     }
     Utils.goBoardId(this.boardId);
     Utils.goBoardId(this.boardId);
   }),
   }),