YouTrack - Worlflow does not send out all notifications through SMTP

Hello,

When using the sample workflow below, not all of the notifications are sent to their respective users via SMTP.

Code
cron: 0 44 15 ? * MON-FRI [State == {Private}]{
  issue.reporter.notify(issue.getID() + " - " + issue.summary, "Test -  this issue is private!");
}

I have set up the email settings in the administration page, and I am able to send test emails.

If a user should have received 5 emails, they only will receive 1 or 2 instead; I have tried this with various SMTP servers and have had the same result.

How can I configure the workflow/youtrack so that all of the email notifications are sent out? Are there any SMTP servers that anyone could recommend?

Thank you,
Jason
6 comments
Comment actions Permalink
Hello,

I get letter using similar cron expression on my environment.
Are you sure issue was standing in state 'Private' all the time? Did you changed email setting during MON-FRI period?

Could you please also attach youtrack.log and notifications.log available on {home dir}/.youtrack/logs.
0
Comment actions Permalink
Hello Dmitry,

I have restarted YouTrack completely and then captured the log file after the task was supposed to be executed.

In order to have the event fire I changed the time to 11:45:00.

There were 3 tickets with the private state, and all were reported by jasonm. No tickets were changed between the start of YouTrack and the notification time, and there were no email setting changes.
It looks like two notifications were sent to the user, but only one email was received. I have also attached the error log, although it seems clear.

Thanks very much for looking into this issue,

Jason-


youtrack.log (339KB)
notifications.log (290B)
errors.log (1.8KB)
0
Comment actions Permalink
Hi Dmitry,

When I originally posed this, as you noted I did change the email setting during the MON-FRI period. After the restart, it seems all of the email notifications are sent out.
One of the other issues seems to rely on the mail provider, when sending the notifications to Gmail, all notifications are received, on for other providers they are not; I assume they are being filtered out.

In order to circumvent this issue with the mail provider is there a way to send one email out with the information for all of the affected tickets?  

Thank you,

Jason
0
Comment actions Permalink
It isn't implemented yet. Please look at http://youtrack.jetbrains.com/issue/JT-10724 and related issues.

As workaround you can make a report for issues set:
schedule rule report 
 
cron: 0 44 15 ? * MON_FRI [for all issues] { 
  if (summary.contains("my secret issue", opts)) { 
    var issuesSet = project.issues; 
    var report = ""; 
    for each curIssue in issuesSet { 
      if (curIssue.Priority == {Show-stopper}) { 
        report = report + curIssue.getId() + " "; 
      } 
    } 
     
    if (report.isNotEmpty) { 
      project.leader.notify("Show-Stoppers", "Issue with priority 'Show-Stopper': " + report); 
    } 
  } 
}


Please note! project.issues iteration can make performance problems for large project.
0
Comment actions Permalink

Hi,

I have similar problem that all mails are not delivered, but I can see them them in console.log and they are not delivered anyway. I also tried with summary report mails, so I group the mails for each receiver, but I still have a problem, that all mails are not delivered.

Is there a way to make a delay between deliveries. So I will wait for 1000 ms between each delivery? I tried with setTimeout and it wont work.

Thank you
Damjan

0
Comment actions Permalink

Hello Damjan,

this is a rather old forum thread which is mostly related to our old non-JS workflows. I believe it would be better if we continue handling your case in a separate support ticket, so please submit one via this link: https://youtrack-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66282

With your request, please attach the full code of your workflow rule and a screenshot of the SMTP settings of your YouTrack.

Thank you!

0

Please sign in to leave a comment.