We're using YouTrack 2022.1.46592, we have defined a workflow to send SMS to team leaders when a "Show-Stopper" issue is opened by the support team.
The problem is that when support opens a new issue - the SMS contains incorrect issue (just takes the previous "Show-Stopper" issue.
Testing the code - I narrowed it down to a cache issue within youtrack, so the following happens:
1. sending the sms directly from browser with different issue number - WORKS
2. creating a show stopper issue several times will send the first issue multiple times, although the print in the console is correct.
This is reproducible about 9/10 times.
I tried using POST/GET, random param to invalidate cache, no cache headers - all the same.
var connection = new http.Connection(WEBHOOK_URL, null, 2000);
connection.addHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
connection.addHeader("Pragma", "no-cache"); // HTTP 1.0.
connection.addHeader("Expires", "0"); // Proxies.
//connection.postSync('', null, JSON.stringify(payload));
//connection.postSync('', queryParams, null);
Is this a know issue? is there a workaround?