mirror of
https://github.com/wekan/wekan.git
synced 2026-02-19 22:48:07 +01:00
Merge branch 'edge' into edge
This commit is contained in:
commit
28a01862d0
63 changed files with 344 additions and 211 deletions
|
|
@ -3,7 +3,9 @@ RulesHelper = {
|
|||
const matchingRules = this.findMatchingRules(activity);
|
||||
for(let i = 0; i< matchingRules.length; i++){
|
||||
const action = matchingRules[i].getAction();
|
||||
this.performAction(activity, action);
|
||||
if(action !== undefined){
|
||||
this.performAction(activity, action);
|
||||
}
|
||||
}
|
||||
},
|
||||
findMatchingRules(activity){
|
||||
|
|
@ -16,7 +18,12 @@ RulesHelper = {
|
|||
const matchingTriggers = Triggers.find(matchingMap);
|
||||
const matchingRules = [];
|
||||
matchingTriggers.forEach(function(trigger){
|
||||
matchingRules.push(trigger.getRule());
|
||||
const rule = trigger.getRule();
|
||||
// Check that for some unknown reason there are some leftover triggers
|
||||
// not connected to any rules
|
||||
if(rule !== undefined){
|
||||
matchingRules.push(trigger.getRule());
|
||||
}
|
||||
});
|
||||
return matchingRules;
|
||||
},
|
||||
|
|
@ -65,10 +72,10 @@ RulesHelper = {
|
|||
const emailSubject = action.emailSubject;
|
||||
try {
|
||||
Email.send({
|
||||
to,
|
||||
emailTo,
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject,
|
||||
text,
|
||||
emailSubject,
|
||||
emailMsg,
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue