diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index f2f005a9c01b4f5839142fff1ada0dba12176386..dcb0c5cdfe5d2afe8e1aa313899e8d8c90bd2377 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -5672,7 +5672,8 @@ void pack_job(struct job_record *dump_job_ptr, uint16_t show_flags, Buf buffer, packstr(dump_job_ptr->comment, buffer); packstr(dump_job_ptr->gres, buffer); packstr(dump_job_ptr->batch_host, buffer); - if ((show_flags & SHOW_DETAIL) && + if (!IS_JOB_COMPLETED(dump_job_ptr) && + (show_flags & SHOW_DETAIL) && ((dump_job_ptr->user_id == (uint32_t) uid) || validate_slurm_user(uid))) { char *batch_script = get_job_script(dump_job_ptr);