diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-08-21 22:20:45 +0200 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-08-21 22:21:23 +0200 |
commit | 3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb (patch) | |
tree | b36727b738aeda55d0c047d5e56ae19ec2d2b82c /models/cards.js | |
parent | b881c3b90824576ffcc75c7160a66c2314dab615 (diff) | |
download | wekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.tar.gz wekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.tar.bz2 wekan-3e715bbcc9e2cf3aad043dc7ab0ed76b519e80eb.zip |
Fix and improve linked cards
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 21a7f2ad..302beddc 100644 --- a/models/cards.js +++ b/models/cards.js @@ -712,6 +712,14 @@ Cards.helpers({ } }, + getId() { + if (this.isLinked()) { + return this.linkedId; + } else { + return this._id; + } + }, + getTitle() { if (this.isLinkedCard()) { const card = Cards.findOne({ _id: this.linkedId }); |