From: Eric Bollengier Date: Wed, 29 Jan 2020 11:00:56 +0000 (+0100) Subject: Fix #5855 Do not promote copy jobs in error when the original job is pruned X-Git-Tag: Release-9.6.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410b50c3780c7ff275095a4431d00eebd1423d56;p=thirdparty%2Fbacula.git Fix #5855 Do not promote copy jobs in error when the original job is pruned --- diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index cda9fa591..d5b8f4117 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -527,7 +527,7 @@ static const char *uap_upgrade_copies_oldest_job_default = "SELECT PriorJobId " "FROM Job " "WHERE JobId IN (%s) " /* JobId selection */ - " AND Type='B' " + " AND Type='B' AND JobStatus IN ('T', 'W') " ") " ") " "GROUP BY PriorJobId "; /* one result per copy */