From cc32170057d06d8dbe3f73bdfdaef627d4992e2e Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Tue, 14 Oct 2025 21:57:58 +0200 Subject: [PATCH 1/6] Check joblog for EVFEVENT info --- src/ui/actions.ts | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/ui/actions.ts b/src/ui/actions.ts index 6aa31d582..3cada7783 100644 --- a/src/ui/actions.ts +++ b/src/ui/actions.ts @@ -379,7 +379,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur fromWorkspace && chosenAction.postDownload && (chosenAction.postDownload.includes(`.evfevent`) || chosenAction.postDownload.includes(`.evfevent/`)); - const possibleObject = getObjectFromCommand(commandResult.command); + const possibleObject = getObjectFromJoblog(commandResult.stderr) || getObjectFromCommand(commandResult.command); if (isIleCommand && possibleObject) { Object.assign(evfeventInfo, possibleObject); } @@ -544,7 +544,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur resultsPanel.addParagraph(`
${targets[0].output.join("")}
`) .setOptions({ fullPage: true , css: /* css */ ` - pre{ + pre{ background-color: transparent; } ` @@ -564,7 +564,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur pre { margin: 1em; background-color: transparent; - } + } ` }); } @@ -624,6 +624,27 @@ export async function getAllAvailableActions(targets: ActionTarget[], scheme: st return availableActions; } +function getObjectFromJoblog(stderr: string): CommandObject | undefined { + const joblogLines = stderr.split(`\n`).filter(line => line.slice(7, 19).toUpperCase() === `: EVFEVENT:`); + if (joblogLines.length < 1) return; + const evfevent = joblogLines[0].slice(19).trim(); + if (evfevent.length) { + const object = evfevent.split(/[,\|/]/); + if (object) { + if (object.length === 2) { + return { + library: object[0].trim(), + object: object[1].trim() + }; + } else { + return { + object: object[0].trim() + }; + } + } + } +} + function getObjectFromCommand(baseCommand?: string): CommandObject | undefined { if (baseCommand) { const regex = PARM_REGEX.exec(baseCommand.toUpperCase()); From 3bec2b28c37d59395e310bf69ce092cda4582d4b Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Wed, 15 Oct 2025 00:02:46 +0200 Subject: [PATCH 2/6] Allow multiple EVFEVENT files from server --- src/ui/actions.ts | 98 ++++++++++++++++++++++++++----------------- src/ui/diagnostics.ts | 12 +++--- 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/src/ui/actions.ts b/src/ui/actions.ts index 3cada7783..a5f351a99 100644 --- a/src/ui/actions.ts +++ b/src/ui/actions.ts @@ -161,21 +161,21 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur } Object.entries(envFileVars).forEach(([key, value]) => variables.set(`&${key}`, value)); - const evfeventInfo: EvfEventInfo = { + let evfeventInfo: EvfEventInfo[] = [{ object: '', library: '', extension: target.extension, workspace: fromWorkspace - }; + }]; let processedPath = ""; switch (chosenAction.type) { case `member`: const memberDetail = connection.parserMemberPath(target.uri.path); - evfeventInfo.library = memberDetail.library; - evfeventInfo.object = memberDetail.name; - evfeventInfo.extension = memberDetail.extension; - evfeventInfo.asp = memberDetail.asp; + evfeventInfo[0].library = memberDetail.library; + evfeventInfo[0].object = memberDetail.name; + evfeventInfo[0].extension = memberDetail.extension; + evfeventInfo[0].asp = memberDetail.asp; processedPath = `${memberDetail.library}/${memberDetail.file}/${memberDetail.basename}`; @@ -214,14 +214,14 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur name = name.substring(0, name.indexOf(`-`)); } - evfeventInfo.library = connection.upperCaseName(variables.get(`&CURLIB`) || config.currentLibrary); - evfeventInfo.object = connection.upperCaseName(name); - evfeventInfo.extension = ext; + evfeventInfo[0].library = connection.upperCaseName(variables.get(`&CURLIB`) || config.currentLibrary); + evfeventInfo[0].object = connection.upperCaseName(name); + evfeventInfo[0].extension = ext; if (chosenAction.command.includes(`&SRCFILE`)) { - variables.set(`&SRCLIB`, evfeventInfo.library) + variables.set(`&SRCLIB`, evfeventInfo[0].library) .set(`&SRCPF`, `QTMPSRC`) - .set(`&SRCFILE`, `${evfeventInfo.library}/QTMPSRC`); + .set(`&SRCFILE`, `${evfeventInfo[0].library}/QTMPSRC`); } switch (chosenAction.type) { @@ -270,8 +270,8 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur const [_, library, fullName] = connection.upperCaseName(target.uri.path).split(`/`); const object = fullName.substring(0, fullName.lastIndexOf(`.`)); - evfeventInfo.library = library; - evfeventInfo.object = object; + evfeventInfo[0].library = library; + evfeventInfo[0].object = object; processedPath = `${library}/${object}.${target.extension}`; @@ -330,7 +330,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur // If &SRCFILE is set, we need to copy the file to a temporary source file from the IFS const fullPath = variables.get(`&FULLPATH`); const srcFile = variables.get(`&SRCFILE`); - if (fullPath && srcFile && evfeventInfo.object) { + if (fullPath && srcFile && evfeventInfo[0].object) { const [lib, srcpf] = srcFile.split(`/`); const createSourceFile = content.toCl(`CRTSRCPF`, { @@ -340,7 +340,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur const copyFromStreamfile = content.toCl(`CPYFRMSTMF`, { fromstmf: fullPath, - tombr: `'${Tools.qualifyPath(lib, srcpf, evfeventInfo.object)}'`, + tombr: `'${Tools.qualifyPath(lib, srcpf, evfeventInfo[0].object)}'`, mbropt: `*REPLACE`, dbfccsid: `*FILE`, stmfccsid: 1208, @@ -379,12 +379,26 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur fromWorkspace && chosenAction.postDownload && (chosenAction.postDownload.includes(`.evfevent`) || chosenAction.postDownload.includes(`.evfevent/`)); - const possibleObject = getObjectFromJoblog(commandResult.stderr) || getObjectFromCommand(commandResult.command); - if (isIleCommand && possibleObject) { - Object.assign(evfeventInfo, possibleObject); + const possibleObjects = getObjectsFromJoblog(commandResult.stderr) || getObjectFromCommand(commandResult.command); + if (isIleCommand && possibleObjects) { + if (Array.isArray(possibleObjects)) { + const tempEvfeventInfo = evfeventInfo[0]; + evfeventInfo = []; + for(const o of possibleObjects) { + evfeventInfo.push({ + library: o.library ? o.library : tempEvfeventInfo.library, + object: o.object, + extension: tempEvfeventInfo.extension, + asp: tempEvfeventInfo.asp + }) + }; + } else { + evfeventInfo[0].library = possibleObjects.library ? possibleObjects.library : evfeventInfo[0].library; + evfeventInfo[0].object = possibleObjects.object; + } } - actionName = (isIleCommand && possibleObject ? `${chosenAction.name} for ${evfeventInfo.library}/${evfeventInfo.object}` : actionName); + actionName = (isIleCommand && possibleObjects ? `${chosenAction.name} for ${evfeventInfo[0].library}/${evfeventInfo[0].object}` : actionName); successful = (commandResult.code === 0 || commandResult.code === null); writeEmitter.fire(CompileTools.NEWLINE); @@ -393,13 +407,13 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur writeEmitter.fire(`Fetching errors from .evfevent.${CompileTools.NEWLINE}`); } - else if (evfeventInfo.object && evfeventInfo.library) { + else if (evfeventInfo[0].object && evfeventInfo[0].library) { if (chosenAction.command.includes(`*EVENTF`)) { - writeEmitter.fire(`Fetching errors for ${evfeventInfo.library}/${evfeventInfo.object}.` + CompileTools.NEWLINE); + writeEmitter.fire(`Fetching errors for ` + (evfeventInfo.length > 1 ? `multiple objects` : `evfeventInfo[0].library/evfeventInfo[0].object}.`) + CompileTools.NEWLINE); await refreshDiagnosticsFromServer(instance, evfeventInfo); problemsFetched = true; } else if (chosenAction.command.trimStart().toUpperCase().startsWith(`CRT`)) { - writeEmitter.fire(`*EVENTF not found in command string. Not fetching errors for ${evfeventInfo.library}/${evfeventInfo.object}.` + CompileTools.NEWLINE); + writeEmitter.fire(`*EVENTF not found in command string. Not fetching errors for ${evfeventInfo[0].library}/${evfeventInfo[0].object}.` + CompileTools.NEWLINE); } } @@ -481,7 +495,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur // Process locally downloaded evfevent files: if (useLocalEvfevent) { - await refreshDiagnosticsFromLocal(instance, evfeventInfo); + await refreshDiagnosticsFromLocal(instance, evfeventInfo[0]); problemsFetched = true; } }) @@ -502,7 +516,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur } catch (e) { writeEmitter.fire(`${e}\n`); - vscode.window.showErrorMessage(`Action ${chosenAction} for ${evfeventInfo.library}/${evfeventInfo.object} failed. (internal error).`); + vscode.window.showErrorMessage(`Action ${chosenAction} for ${evfeventInfo[0].library}/${evfeventInfo[0].object} failed. (internal error).`); successful = false; } @@ -624,25 +638,31 @@ export async function getAllAvailableActions(targets: ActionTarget[], scheme: st return availableActions; } -function getObjectFromJoblog(stderr: string): CommandObject | undefined { +function getObjectsFromJoblog(stderr: string): CommandObject[] | undefined { + const objects: CommandObject[] = []; + const joblogLines = stderr.split(`\n`).filter(line => line.slice(7, 19).toUpperCase() === `: EVFEVENT:`); - if (joblogLines.length < 1) return; - const evfevent = joblogLines[0].slice(19).trim(); - if (evfevent.length) { - const object = evfevent.split(/[,\|/]/); - if (object) { - if (object.length === 2) { - return { - library: object[0].trim(), - object: object[1].trim() - }; - } else { - return { - object: object[0].trim() - }; + + for(const joblogLine of joblogLines) { + const evfevent = joblogLine.slice(19).trim(); + if (evfevent.length) { + const object = evfevent.split(/[,\|/]/); + if (object) { + if (object.length >= 2) { + objects.push({ + library: object[0].trim(), + object: object[1].trim() + }); + } else { + objects.push({ + object: object[0].trim() + }); + } } } } + + return objects.length > 0 ? objects : undefined; } function getObjectFromCommand(baseCommand?: string): CommandObject | undefined { diff --git a/src/ui/diagnostics.ts b/src/ui/diagnostics.ts index a348c2398..59bb2cb4b 100644 --- a/src/ui/diagnostics.ts +++ b/src/ui/diagnostics.ts @@ -57,20 +57,22 @@ export function clearDiagnostic(uri: vscode.Uri, changeRange: vscode.Range) { } } -export async function refreshDiagnosticsFromServer(instance: Instance, evfeventInfo: EvfEventInfo, keepDiagnostics?: boolean) { +export async function refreshDiagnosticsFromServer(instance: Instance, evfeventInfo: EvfEventInfo[], keepDiagnostics?: boolean) { const connection = instance.getConnection(); if (connection) { const content = connection.getContent(); - const tableData = await content.getTable(evfeventInfo.library, `EVFEVENT`, evfeventInfo.object); - const lines = tableData.map(row => String(row.EVFEVENT)); if (IBMi.connectionManager.get(`clearErrorsBeforeBuild`) && !keepDiagnostics) { // Clear all errors if the user has this setting enabled clearDiagnostics(); } - handleEvfeventLines(lines, instance, evfeventInfo); + evfeventInfo.forEach(async e => { + const tableData = await content.getTable(e.library, `EVFEVENT`, e.object); + const lines = tableData.map(row => String(row.EVFEVENT)); + handleEvfeventLines(lines, instance, e); + }); } else { throw new Error('Please connect to an IBM i'); } @@ -153,7 +155,7 @@ export function handleEvfeventLines(lines: string[], instance: Instance, evfeven if (connection) { // Belive it or not, sometimes if the deploy directory is symlinked into as ASP, this can be a problem const aspNames = connection.getAllIAsps().map(asp => asp.name); - + for (const aspName of aspNames) { const aspRoot = `/${aspName}`; if (relativeCompilePath.startsWith(aspRoot)) { From e959ec38a69dc75679a582c106912d13a6553cf7 Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Wed, 15 Oct 2025 15:19:34 +0200 Subject: [PATCH 3/6] Fix parameter error for changed diagnostics function --- src/commands/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/actions.ts b/src/commands/actions.ts index ccf53608b..98956850c 100644 --- a/src/commands/actions.ts +++ b/src/commands/actions.ts @@ -169,7 +169,7 @@ export function registerActionsCommands(instance: Instance): Disposable[] { const [library, object] = inputPath.split(`/`); if (library && object) { const nameDetail = path.parse(object); - refreshDiagnosticsFromServer(instance, { library, object: nameDetail.name, extension: (nameDetail.ext.length > 1 ? nameDetail.ext.substring(1) : undefined), workspace: options.workspace }, options.keepDiagnostics); + refreshDiagnosticsFromServer(instance, [{ library, object: nameDetail.name, extension: (nameDetail.ext.length > 1 ? nameDetail.ext.substring(1) : undefined), workspace: options.workspace }], options.keepDiagnostics); } } }), From 28faea8d61bb74af478a181be0c0857bf98c82b1 Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Thu, 16 Oct 2025 17:20:29 +0200 Subject: [PATCH 4/6] Fix evfevent download status text --- src/ui/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/actions.ts b/src/ui/actions.ts index a5f351a99..db492b27c 100644 --- a/src/ui/actions.ts +++ b/src/ui/actions.ts @@ -409,7 +409,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur } else if (evfeventInfo[0].object && evfeventInfo[0].library) { if (chosenAction.command.includes(`*EVENTF`)) { - writeEmitter.fire(`Fetching errors for ` + (evfeventInfo.length > 1 ? `multiple objects` : `evfeventInfo[0].library/evfeventInfo[0].object}.`) + CompileTools.NEWLINE); + writeEmitter.fire(`Fetching errors for ` + (evfeventInfo.length > 1 ? `multiple objects` : `${evfeventInfo[0].library}/${evfeventInfo[0].object}.`) + CompileTools.NEWLINE); await refreshDiagnosticsFromServer(instance, evfeventInfo); problemsFetched = true; } else if (chosenAction.command.trimStart().toUpperCase().startsWith(`CRT`)) { From 8574c2d76a1e05c5804126e5a48eacd8dfa8a742 Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Sun, 2 Nov 2025 17:46:51 +0100 Subject: [PATCH 5/6] Somplify code for multiple evfevent files from one build command --- src/ui/actions.ts | 61 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/ui/actions.ts b/src/ui/actions.ts index db492b27c..6366ded55 100644 --- a/src/ui/actions.ts +++ b/src/ui/actions.ts @@ -161,21 +161,22 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur } Object.entries(envFileVars).forEach(([key, value]) => variables.set(`&${key}`, value)); - let evfeventInfo: EvfEventInfo[] = [{ + const evfeventInfo: EvfEventInfo = { object: '', library: '', extension: target.extension, workspace: fromWorkspace - }]; + }; + const evfeventInfos: EvfEventInfo[] = []; let processedPath = ""; switch (chosenAction.type) { case `member`: const memberDetail = connection.parserMemberPath(target.uri.path); - evfeventInfo[0].library = memberDetail.library; - evfeventInfo[0].object = memberDetail.name; - evfeventInfo[0].extension = memberDetail.extension; - evfeventInfo[0].asp = memberDetail.asp; + evfeventInfo.library = memberDetail.library; + evfeventInfo.object = memberDetail.name; + evfeventInfo.extension = memberDetail.extension; + evfeventInfo.asp = memberDetail.asp; processedPath = `${memberDetail.library}/${memberDetail.file}/${memberDetail.basename}`; @@ -214,14 +215,14 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur name = name.substring(0, name.indexOf(`-`)); } - evfeventInfo[0].library = connection.upperCaseName(variables.get(`&CURLIB`) || config.currentLibrary); - evfeventInfo[0].object = connection.upperCaseName(name); - evfeventInfo[0].extension = ext; + evfeventInfo.library = connection.upperCaseName(variables.get(`&CURLIB`) || config.currentLibrary); + evfeventInfo.object = connection.upperCaseName(name); + evfeventInfo.extension = ext; if (chosenAction.command.includes(`&SRCFILE`)) { - variables.set(`&SRCLIB`, evfeventInfo[0].library) + variables.set(`&SRCLIB`, evfeventInfo.library) .set(`&SRCPF`, `QTMPSRC`) - .set(`&SRCFILE`, `${evfeventInfo[0].library}/QTMPSRC`); + .set(`&SRCFILE`, `${evfeventInfo.library}/QTMPSRC`); } switch (chosenAction.type) { @@ -270,8 +271,8 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur const [_, library, fullName] = connection.upperCaseName(target.uri.path).split(`/`); const object = fullName.substring(0, fullName.lastIndexOf(`.`)); - evfeventInfo[0].library = library; - evfeventInfo[0].object = object; + evfeventInfo.library = library; + evfeventInfo.object = object; processedPath = `${library}/${object}.${target.extension}`; @@ -330,7 +331,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur // If &SRCFILE is set, we need to copy the file to a temporary source file from the IFS const fullPath = variables.get(`&FULLPATH`); const srcFile = variables.get(`&SRCFILE`); - if (fullPath && srcFile && evfeventInfo[0].object) { + if (fullPath && srcFile && evfeventInfo.object) { const [lib, srcpf] = srcFile.split(`/`); const createSourceFile = content.toCl(`CRTSRCPF`, { @@ -340,7 +341,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur const copyFromStreamfile = content.toCl(`CPYFRMSTMF`, { fromstmf: fullPath, - tombr: `'${Tools.qualifyPath(lib, srcpf, evfeventInfo[0].object)}'`, + tombr: `'${Tools.qualifyPath(lib, srcpf, evfeventInfo.object)}'`, mbropt: `*REPLACE`, dbfccsid: `*FILE`, stmfccsid: 1208, @@ -381,24 +382,24 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur const possibleObjects = getObjectsFromJoblog(commandResult.stderr) || getObjectFromCommand(commandResult.command); if (isIleCommand && possibleObjects) { + evfeventInfos.length = 0; if (Array.isArray(possibleObjects)) { - const tempEvfeventInfo = evfeventInfo[0]; - evfeventInfo = []; for(const o of possibleObjects) { - evfeventInfo.push({ - library: o.library ? o.library : tempEvfeventInfo.library, + evfeventInfos.push({ + library: o.library || evfeventInfo.library, object: o.object, - extension: tempEvfeventInfo.extension, - asp: tempEvfeventInfo.asp + extension: evfeventInfo.extension, + asp: evfeventInfo.asp }) }; } else { - evfeventInfo[0].library = possibleObjects.library ? possibleObjects.library : evfeventInfo[0].library; - evfeventInfo[0].object = possibleObjects.object; + evfeventInfo.library = possibleObjects.library ? possibleObjects.library : evfeventInfo.library; + evfeventInfo.object = possibleObjects.object; + evfeventInfos.push(evfeventInfo); } } - actionName = (isIleCommand && possibleObjects ? `${chosenAction.name} for ${evfeventInfo[0].library}/${evfeventInfo[0].object}` : actionName); + actionName = (isIleCommand && possibleObjects ? `${chosenAction.name} for ${evfeventInfo.library}/${evfeventInfo.object}` : actionName); successful = (commandResult.code === 0 || commandResult.code === null); writeEmitter.fire(CompileTools.NEWLINE); @@ -407,13 +408,13 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur writeEmitter.fire(`Fetching errors from .evfevent.${CompileTools.NEWLINE}`); } - else if (evfeventInfo[0].object && evfeventInfo[0].library) { + else if (evfeventInfo.object && evfeventInfo.library) { if (chosenAction.command.includes(`*EVENTF`)) { - writeEmitter.fire(`Fetching errors for ` + (evfeventInfo.length > 1 ? `multiple objects` : `${evfeventInfo[0].library}/${evfeventInfo[0].object}.`) + CompileTools.NEWLINE); - await refreshDiagnosticsFromServer(instance, evfeventInfo); + writeEmitter.fire(`Fetching errors for ` + (evfeventInfos.length > 1 ? `multiple objects` : `${evfeventInfo.library}/${evfeventInfo.object}.`) + CompileTools.NEWLINE); + await refreshDiagnosticsFromServer(instance, evfeventInfos); problemsFetched = true; } else if (chosenAction.command.trimStart().toUpperCase().startsWith(`CRT`)) { - writeEmitter.fire(`*EVENTF not found in command string. Not fetching errors for ${evfeventInfo[0].library}/${evfeventInfo[0].object}.` + CompileTools.NEWLINE); + writeEmitter.fire(`*EVENTF not found in command string. Not fetching errors for ${evfeventInfo.library}/${evfeventInfo.object}.` + CompileTools.NEWLINE); } } @@ -495,7 +496,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur // Process locally downloaded evfevent files: if (useLocalEvfevent) { - await refreshDiagnosticsFromLocal(instance, evfeventInfo[0]); + await refreshDiagnosticsFromLocal(instance, evfeventInfo); problemsFetched = true; } }) @@ -516,7 +517,7 @@ export async function runAction(instance: Instance, uris: vscode.Uri | vscode.Ur } catch (e) { writeEmitter.fire(`${e}\n`); - vscode.window.showErrorMessage(`Action ${chosenAction} for ${evfeventInfo[0].library}/${evfeventInfo[0].object} failed. (internal error).`); + vscode.window.showErrorMessage(`Action ${chosenAction} for ${evfeventInfo.library}/${evfeventInfo.object} failed. (internal error).`); successful = false; } From 653350185e575cabe3127d27a4e4d1ccbd165f4c Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Sun, 2 Nov 2025 19:09:08 +0100 Subject: [PATCH 6/6] Improve extraction of EVFEVENT info from joblog --- src/ui/actions.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui/actions.ts b/src/ui/actions.ts index 6366ded55..675db42fc 100644 --- a/src/ui/actions.ts +++ b/src/ui/actions.ts @@ -642,12 +642,13 @@ export async function getAllAvailableActions(targets: ActionTarget[], scheme: st function getObjectsFromJoblog(stderr: string): CommandObject[] | undefined { const objects: CommandObject[] = []; - const joblogLines = stderr.split(`\n`).filter(line => line.slice(7, 19).toUpperCase() === `: EVFEVENT:`); + // Filter lines with EVFEVENT info from server. + const joblogLines = stderr.split(`\n`).filter(line => line.match(/: EVFEVENT:/i)); for(const joblogLine of joblogLines) { - const evfevent = joblogLine.slice(19).trim(); + const evfevent = joblogLine.match(/: EVFEVENT:(.*)/i) || ''; if (evfevent.length) { - const object = evfevent.split(/[,\|/]/); + const object = evfevent[1].trim().split(/[,\|/]/); if (object) { if (object.length >= 2) { objects.push({