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 return jsonify({"status": "error", "message": "Forbidden."}), 403
payload = request.get_json(silent=True) or {} 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: try:
run_id = int(payload.get("job_run_id") or 0) run_id = int(payload.get("job_run_id") or 0)
except Exception: except Exception:

View File

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

View File

@ -207,10 +207,7 @@
<div class="mt-2"> <div class="mt-2">
<input class="form-control form-control-sm" id="rcm_ticket_code" type="text" placeholder="Ticket number (e.g., T20260106.0001)" /> <input class="form-control form-control-sm" id="rcm_ticket_code" type="text" placeholder="Ticket number (e.g., T20260106.0001)" />
</div> </div>
<div class="mt-2"> <div class="mt-2 small text-muted" id="rcm_ticket_status"></div>
<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>
</div> </div>
<div class="col-12 col-lg-6"> <div class="col-12 col-lg-6">
@ -829,8 +826,7 @@ table.addEventListener('change', function (e) {
var btnTicket = document.getElementById('rcm_ticket_save'); var btnTicket = document.getElementById('rcm_ticket_save');
var btnRemark = document.getElementById('rcm_remark_save'); var btnRemark = document.getElementById('rcm_remark_save');
var tCode = document.getElementById('rcm_ticket_code'); 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 rBody = document.getElementById('rcm_remark_body');
var rStatus = document.getElementById('rcm_remark_status'); var rStatus = document.getElementById('rcm_remark_status');
@ -843,8 +839,7 @@ table.addEventListener('change', function (e) {
if (btnTicket) btnTicket.disabled = disabled; if (btnTicket) btnTicket.disabled = disabled;
if (btnRemark) btnRemark.disabled = disabled; if (btnRemark) btnRemark.disabled = disabled;
if (tCode) tCode.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; window.__rcmSetCreateDisabled = setDisabled;
@ -855,8 +850,7 @@ table.addEventListener('change', function (e) {
if (!currentRunId) { alert('Select a run first.'); return; } if (!currentRunId) { alert('Select a run first.'); return; }
clearStatus(); clearStatus();
var ticket_code = tCode ? (tCode.value || '').trim().toUpperCase() : ''; 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.'; if (tStatus) tStatus.textContent = 'Ticket number is required.';
else alert('Ticket number is required.'); else alert('Ticket number is required.');
return; return;
@ -869,12 +863,11 @@ table.addEventListener('change', function (e) {
if (tStatus) tStatus.textContent = 'Saving...'; if (tStatus) tStatus.textContent = 'Saving...';
apiJson('/api/tickets', { apiJson('/api/tickets', {
method: 'POST', 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 () { .then(function () {
if (tCode) tCode.value = ''; if (tCode) tCode.value = '';
if (tDesc) tDesc.value = ''; if (tStatus) tStatus.textContent = '';
if (tStatus) tStatus.textContent = '';
loadAlerts(currentRunId); loadAlerts(currentRunId);
}) })
.catch(function (e) { .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. 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. 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 ## v0.1.16