From ce4d9512e582a24dd65dd8fd587fe3dc0af2b59f Mon Sep 17 00:00:00 2001 From: worksofliam Date: Mon, 26 Aug 2024 13:09:41 -0400 Subject: [PATCH] Only show SELF logs that since the selected job has started Signed-off-by: worksofliam --- src/views/jobManager/selfCodes/selfCodesResultsView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/jobManager/selfCodes/selfCodesResultsView.ts b/src/views/jobManager/selfCodes/selfCodesResultsView.ts index c5dab7d6..b2ca92e2 100644 --- a/src/views/jobManager/selfCodes/selfCodesResultsView.ts +++ b/src/views/jobManager/selfCodes/selfCodesResultsView.ts @@ -111,7 +111,8 @@ export class selfCodesResultsView implements TreeDataProvider { job_name, user_name, reason_code, logged_time, logged_sqlstate, logged_sqlcode, matches, stmttext, message_text, message_second_level_text, program_library, program_name, program_type, module_name, client_applname, client_programid, initial_stack FROM qsys2.sql_error_log, lateral (select * from TABLE(SYSTOOLS.SQLCODE_INFO(logged_sqlcode))) - where user_name = current_user ${onlySelected ? `and job_name = '${selected.job.id}'` : ``} + where user_name = current_user + and ${onlySelected ? `job_name = '${selected.job.id}'` : `LOGGED_TIME >= (select JOB_ENTERED_SYSTEM_TIME from table(qsys2.active_job_info('NO', job_name_filter => '*', detailed_info => 'WORK')) x) `} order by logged_time desc`; try {