0
規則:狀態機工作流YouTrack - 通知記者狀態改變後22小時,僅在工作日
- 後場「反饋」到請求變化,這意味着反饋要求,記者在24小時測試
- 僅在工作日(如果星期六應用修復,通知應該等到星期二上午發送,讓他們整整24小時回顧)通知記者,如果他們沒有改變「反饋」到確認或拒絕
- 通知應發2小時前24小時的窗口達
問題:我如何延遲發送在平日的通知,如果一個修補程序在週五或週六應用?
我嘗試:
state machine Request feedback from reporter for field Feedback {
initial state Not needed {
exit {
// just a placeholder b/c initial state seems to be mandatory
message ("You are requesting feedback from the reporter.")
}
}
state Requested {
in 22 hours[always] do {
// calculate if this is a weekday
var dayOfWeek = now.format(#EEEE);
if (dayOfWeek != "Sat" || dayOfWeek != "Sun") {
reporter.notify("Two hours left to approve fix for the issue"+ getId(), "Please review the applied fix for issue and set the Feedback to 'Confirmed' or 'Rejected'.");
} else {
// somehow delay the notification?
}
}
}
謝謝!我最終使用了一個時間表規則,因爲據我所知,實施起來要簡單得多。 – Carol