Merge branch 'v20260203-03-autotask-resolve-note-verify' into main
This commit is contained in:
commit
7b3b89f50c
@ -1 +1 @@
|
|||||||
v20260203-02-autotask-resolve-button-enabled
|
v20260203-03-autotask-resolve-note-verify
|
||||||
|
|||||||
@ -1893,7 +1893,23 @@ def api_run_checks_autotask_resolve_note():
|
|||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return jsonify({"status": "error", "message": f"Autotask ticket update failed: {exc}"}), 400
|
return jsonify({"status": "error", "message": f"Autotask ticket update failed: {exc}"}), 400
|
||||||
|
|
||||||
return jsonify({"status": "ok"})
|
# Verify the update actually persisted (some tenants can return success while ignoring fields).
|
||||||
|
try:
|
||||||
|
t2 = client.get_ticket(ticket_id)
|
||||||
|
except Exception as exc:
|
||||||
|
return jsonify({"status": "error", "message": f"Autotask ticket updated but verification failed: {exc}"}), 400
|
||||||
|
|
||||||
|
persisted_desc = str((t2 or {}).get("description") or "")
|
||||||
|
if marker not in persisted_desc:
|
||||||
|
return jsonify(
|
||||||
|
{
|
||||||
|
"status": "error",
|
||||||
|
"message": "Autotask accepted the update request, but the marker text was not found after reloading the ticket. "
|
||||||
|
"This tenant may not allow updating the ticket description via the API.",
|
||||||
|
}
|
||||||
|
), 400
|
||||||
|
|
||||||
|
return jsonify({"status": "ok", "message": "Update posted and verified."})
|
||||||
|
|
||||||
|
|
||||||
@main_bp.post("/api/run-checks/mark-reviewed")
|
@main_bp.post("/api/run-checks/mark-reviewed")
|
||||||
|
|||||||
@ -1200,22 +1200,7 @@ table.addEventListener('change', function (e) {
|
|||||||
})
|
})
|
||||||
.then(function (j) {
|
.then(function (j) {
|
||||||
if (!j || j.status !== 'ok') throw new Error((j && j.message) || 'Failed.');
|
if (!j || j.status !== 'ok') throw new Error((j && j.message) || 'Failed.');
|
||||||
if (atStatus) atStatus.textContent = 'Update posted.';
|
if (atStatus) atStatus.textContent = (j && j.message) ? String(j.message) : 'Update posted.';
|
||||||
// Keep UI consistent (button visibility depends on run state).
|
|
||||||
var keepRunId = currentRunId;
|
|
||||||
if (currentJobId) {
|
|
||||||
return fetch('/api/run-checks/details?job_id=' + encodeURIComponent(currentJobId))
|
|
||||||
.then(function (r) { return r.json(); })
|
|
||||||
.then(function (payload) {
|
|
||||||
currentPayload = payload;
|
|
||||||
var idx = 0;
|
|
||||||
var runs = (payload && payload.runs) || [];
|
|
||||||
for (var i = 0; i < runs.length; i++) {
|
|
||||||
if (String(runs[i].id) === String(keepRunId)) { idx = i; break; }
|
|
||||||
}
|
|
||||||
renderRun(payload, idx);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(function (e) {
|
.catch(function (e) {
|
||||||
if (atStatus) atStatus.textContent = e.message || 'Failed.';
|
if (atStatus) atStatus.textContent = e.message || 'Failed.';
|
||||||
|
|||||||
@ -471,6 +471,14 @@ Changes:
|
|||||||
- Updated UI disable logic so only the Create action is disabled when an active Autotask ticket exists.
|
- Updated UI disable logic so only the Create action is disabled when an active Autotask ticket exists.
|
||||||
- Ensured the Resolve button remains clickable for existing linked Autotask tickets.
|
- Ensured the Resolve button remains clickable for existing linked Autotask tickets.
|
||||||
|
|
||||||
|
## v20260203-03-autotask-resolve-note-verify
|
||||||
|
|
||||||
|
- Fixed download issue by re-packaging the changed files.
|
||||||
|
- Improved Resolve action feedback so status messages remain visible until completion.
|
||||||
|
- Added backend verification step to confirm the Autotask update is actually persisted.
|
||||||
|
- Return a clear error when Autotask accepts the request but does not store the update.
|
||||||
|
- Prevented false-positive “resolved” messages when no ticket update exists.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
## v0.1.21
|
## v0.1.21
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user