Merge pull request 'Auto-commit local changes before build (2026-01-06 12:43:38)' (#45) from v20260106-11-new-ticket-remove-description into main

Reviewed-on: #45
This commit is contained in:
Ivo Oskamp 2026-01-13 11:18:06 +01:00
commit 219775a16b
5 changed files with 22 additions and 28 deletions

View File

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

View File

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

View File

@ -202,10 +202,7 @@
<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 class="mt-2 small text-muted" id="dj_ticket_status"></div>
</div>
</div>
<div class="col-12 col-lg-6">
@ -532,8 +529,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 tStatus = document.getElementById('dj_ticket_status');
var rBody = document.getElementById('dj_remark_body');
var rStatus = document.getElementById('dj_remark_status');
@ -546,8 +542,7 @@
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;
if (rBody) rBody.disabled = disabled;
}
window.__djSetCreateDisabled = setDisabled;
@ -558,8 +553,7 @@
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 (!ticket_code) {
if (tStatus) tStatus.textContent = 'Ticket number is required.';
else alert('Ticket number is required.');
return;
@ -572,12 +566,11 @@
if (tStatus) tStatus.textContent = 'Saving...';
apiJson('/api/tickets', {
method: 'POST',
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code, description: description})
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code})
})
.then(function () {
if (tCode) tCode.value = '';
if (tDesc) tDesc.value = '';
if (tStatus) tStatus.textContent = '';
if (tStatus) tStatus.textContent = '';
loadAlerts(currentRunId);
})
.catch(function (e) {

View File

@ -207,10 +207,7 @@
<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 class="mt-2 small text-muted" id="rcm_ticket_status"></div>
</div>
</div>
<div class="col-12 col-lg-6">
@ -829,8 +826,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 tStatus = document.getElementById('rcm_ticket_status');
var rBody = document.getElementById('rcm_remark_body');
var rStatus = document.getElementById('rcm_remark_status');
@ -843,8 +839,7 @@ table.addEventListener('change', function (e) {
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;
if (rBody) rBody.disabled = disabled;
}
window.__rcmSetCreateDisabled = setDisabled;
@ -855,8 +850,7 @@ table.addEventListener('change', function (e) {
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 (!ticket_code) {
if (tStatus) tStatus.textContent = 'Ticket number is required.';
else alert('Ticket number is required.');
return;
@ -869,12 +863,11 @@ table.addEventListener('change', function (e) {
if (tStatus) tStatus.textContent = 'Saving...';
apiJson('/api/tickets', {
method: 'POST',
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code, description: description})
body: JSON.stringify({job_run_id: currentRunId, ticket_code: ticket_code})
})
.then(function () {
if (tCode) tCode.value = '';
if (tDesc) tDesc.value = '';
if (tStatus) tStatus.textContent = '';
if (tStatus) tStatus.textContent = '';
loadAlerts(currentRunId);
})
.catch(function (e) {

View File

@ -79,6 +79,14 @@
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