From c4b7fa370f892aaa75023fdb9c9a3d3e7c9ad6ec Mon Sep 17 00:00:00 2001 From: Eric Long Date: Wed, 19 Jun 2019 09:58:43 -0400 Subject: [PATCH] 0004017: Canceling load leaves batches in not-OK status on the target --- .../symmetric/service/impl/OutgoingBatchServiceSqlMap.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceSqlMap.java b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceSqlMap.java index 34de912c1c..1a97d32928 100644 --- a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceSqlMap.java +++ b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceSqlMap.java @@ -41,7 +41,8 @@ public OutgoingBatchServiceSqlMap(IDatabasePlatform platform, putSql("selectCountBatchesPrefixSql", "select count(*) from $(outgoing_batch) "); putSql("cancelLoadBatchesSql", - "update $(outgoing_batch) set ignore_count=1, status='OK', error_flag=0, last_update_time=current_timestamp where load_id=?"); + "update $(outgoing_batch) set ignore_count=1, status=case when sent_count > 0 then 'IG' else 'OK' end, " + + "error_flag=0, last_update_time=current_timestamp where load_id=?"); putSql("insertOutgoingBatchSql", "insert into $(outgoing_batch) "