Add timer/scheduler to ticket automation rules

Adds optional delay_days + delay_condition (no_activity) to ticket rules.
When a ticket has no activity for X days, timed rules automatically apply
actions (e.g., escalate priority to urgent). Checked on each ticket list load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 19:24:57 +02:00
parent 1a97e07768
commit 95434a42fe
4 changed files with 90 additions and 3 deletions

View File

@@ -1292,6 +1292,20 @@
<label>Auto-close (päivää)</label>
<input type="number" id="rule-form-autoclose" min="0" max="365" placeholder="esim. 7" style="max-width:120px;">
</div>
<div class="form-group full-width" style="margin-top:0.5rem;">
<label style="font-weight:600;color:#0f3460;">Ajastin (vapaaehtoinen)</label>
</div>
<div class="form-group">
<label>Viive (päivää)</label>
<input type="number" id="rule-form-delay-days" min="0" max="365" placeholder="esim. 3" style="max-width:120px;">
</div>
<div class="form-group">
<label>Ehto</label>
<select id="rule-form-delay-condition">
<option value="">Ei ajastinta</option>
<option value="no_activity">Ei aktiviteettia</option>
</select>
</div>
</div>
<div style="display:flex;gap:0.5rem;margin-top:1rem;">
<button class="btn-primary" id="btn-save-rule">Tallenna</button>