Compare commits

..

No commits in common. "219775a16bddf4aeef5e5f31c16ee6ff9b1b69e7" and "bedfbde1b06935f2de09f2b2d9d3dd20af58b4e0" have entirely different histories.

5 changed files with 28 additions and 22 deletions

View File

@ -1 +1 @@
v20260106-11-new-ticket-remove-description
v20260106-10-fix-remarks-indent-bad-gateway

View File

@ -179,7 +179,7 @@ def api_tickets():
return jsonify({"status": "error", "message": "Forbidden."}), 403
payload = request.get_json(silent=True) or {}
description = None # Description removed from New ticket UI; use remarks for additional context
description = (payload.get("description") or "").strip() or None
try:
run_id = int(payload.get("job_run_id") or 0)
except Exception:

View File

@ -202,6 +202,9 @@
<div class="mt-2">
<input class="form-control form-control-sm" id="dj_ticket_code" type="text" placeholder="Ticket number (e.g., T20260106.0001)" />
</div>
<div class="mt-2">
<textarea class="form-control form-control-sm" id="dj_ticket_description" rows="2" placeholder="Description (optional)"></textarea>
</div>
<div class="mt-2 small text-muted" id="dj_ticket_status"></div>
</div>
</div>
@ -529,6 +532,7 @@
var btnTicket = document.getElementById('dj_ticket_save');
var btnRemark = document.getElementById('dj_remark_save');
var tCode = document.getElementById('dj_ticket_code');
var tDesc = document.getElementById('dj_ticket_description');
var tStatus = document.getElementById('dj_ticket_status');
var rBody = document.getElementById('dj_remark_body');
var rStatus = document.getElementById('dj_remark_status');
@ -542,6 +546,7 @@ var tStatus = document.getElementById('dj_ticket_status');
if (btnTicket) btnTicket.disabled = disabled;
if (btnRemark) btnRemark.disabled = disabled;
if (tCode) tCode.disabled = disabled;
if (tDesc) tDesc.disabled = disabled;
if (rBody) rBody.disabled = disabled;
}
@ -553,6 +558,7 @@ if (rBody) rBody.disabled = disabled;
if (!currentRunId) { alert('Select a run first.'); return; }
clearStatus();
var ticket_code = tCode ? (tCode.value || '').trim().toUpperCase() : '';
var description = tDesc ? tDesc.value : '';
if (!ticket_code) {
if (tStatus) tStatus.textContent = 'Ticket number is required.';
else alert('Ticket number is required.');
@ -566,10 +572,11 @@ if (!ticket_code) {
if (tStatus) tStatus.textContent = 'Saving...';
apiJson('/api/tickets', {
method: 'POST',
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code})
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code, description: description})
})
.then(function () {
if (tCode) tCode.value = '';
if (tDesc) tDesc.value = '';
if (tStatus) tStatus.textContent = '';
loadAlerts(currentRunId);
})

View File

@ -207,6 +207,9 @@
<div class="mt-2">
<input class="form-control form-control-sm" id="rcm_ticket_code" type="text" placeholder="Ticket number (e.g., T20260106.0001)" />
</div>
<div class="mt-2">
<textarea class="form-control form-control-sm" id="rcm_ticket_description" rows="2" placeholder="Description (optional)"></textarea>
</div>
<div class="mt-2 small text-muted" id="rcm_ticket_status"></div>
</div>
</div>
@ -826,6 +829,7 @@ table.addEventListener('change', function (e) {
var btnTicket = document.getElementById('rcm_ticket_save');
var btnRemark = document.getElementById('rcm_remark_save');
var tCode = document.getElementById('rcm_ticket_code');
var tDesc = document.getElementById('rcm_ticket_description');
var tStatus = document.getElementById('rcm_ticket_status');
var rBody = document.getElementById('rcm_remark_body');
var rStatus = document.getElementById('rcm_remark_status');
@ -839,6 +843,7 @@ var tStatus = document.getElementById('rcm_ticket_status');
if (btnTicket) btnTicket.disabled = disabled;
if (btnRemark) btnRemark.disabled = disabled;
if (tCode) tCode.disabled = disabled;
if (tDesc) tDesc.disabled = disabled;
if (rBody) rBody.disabled = disabled;
}
@ -850,6 +855,7 @@ if (rBody) rBody.disabled = disabled;
if (!currentRunId) { alert('Select a run first.'); return; }
clearStatus();
var ticket_code = tCode ? (tCode.value || '').trim().toUpperCase() : '';
var description = tDesc ? tDesc.value : '';
if (!ticket_code) {
if (tStatus) tStatus.textContent = 'Ticket number is required.';
else alert('Ticket number is required.');
@ -863,10 +869,11 @@ if (!ticket_code) {
if (tStatus) tStatus.textContent = 'Saving...';
apiJson('/api/tickets', {
method: 'POST',
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code})
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code, description: description})
})
.then(function () {
if (tCode) tCode.value = '';
if (tDesc) tDesc.value = '';
if (tStatus) tStatus.textContent = '';
loadAlerts(currentRunId);
})

View File

@ -79,14 +79,6 @@
Fixed a Python IndentationError in the remarks detail route that caused Gunicorn to fail on startup.
Removed an incorrectly indented redirect statement so the module loads correctly and prevents Bad Gateway errors.
---
## v20260106-11-new-ticket-remove-description
- Removed the "Description" input from the "New ticket" form on Daily Jobs and Run Checks pages.
- Updated the ticket creation request to store only the ticket number (ticket_code) when creating a new ticket.
- Backend /api/tickets (POST) now ignores any description input during ticket creation (use remarks for additional context).
================================================================================================================================================
## v0.1.16