Sync FP submission lifecycle_status from Ivanti currentState on fetch
When GET /submissions enriches submissions with Ivanti API data, it now checks if batch.currentState (APPROVED, REJECTED, REWORK) differs from the local lifecycle_status and updates the DB accordingly. This ensures approved submissions get filtered out of the queue panel as intended. Also changed safeText() to return null for non-string Ivanti note values (arrays/objects) instead of JSON-stringifying them. The notes array filters nulls via .filter(Boolean) so non-string data is simply hidden.
This commit is contained in:
@@ -4090,7 +4090,7 @@ function FpEditModal({ open, onClose, submission, queueItems, onSuccess }) {
|
||||
const safeText = (val) => {
|
||||
if (!val) return null;
|
||||
if (typeof val === 'string') return val;
|
||||
try { return JSON.stringify(val); } catch { return String(val); }
|
||||
return null;
|
||||
};
|
||||
const notes = [
|
||||
safeText(submission.ivanti_rework_note) && { label: 'Rework Note', text: safeText(submission.ivanti_rework_note) },
|
||||
|
||||
Reference in New Issue
Block a user