Skip to content

Commit e515c19

Browse files
committed
Fixes #745 Added extra check to set stack status migration
1 parent 0ca932e commit e515c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Exceptionless.Core/Migrations/002_SetStackStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override async Task RunAsync(MigrationContext context) {
3131

3232
_logger.LogInformation("Start migrating stacks status");
3333
var sw = Stopwatch.StartNew();
34-
const string script = "if (ctx._source.is_regressed == true) ctx._source.status = 'regressed'; else if (ctx._source.is_hidden == true) ctx._source.status = 'ignored'; else if (ctx._source.disable_notifications == true) ctx._source.status = 'ignored'; else if (ctx._source.is_fixed == true) ctx._source.status = 'fixed'; else ctx._source.status = 'open';";
34+
const string script = "if (ctx._source.is_regressed == true) ctx._source.status = 'regressed'; else if (ctx._source.is_hidden == true) ctx._source.status = 'ignored'; else if (ctx._source.disable_notifications == true) ctx._source.status = 'ignored'; else if (ctx._source.is_fixed == true) ctx._source.status = 'fixed'; else if (ctx._source.containsKey('date_fixed')) ctx._source.status = 'fixed'; else ctx._source.status = 'open';";
3535
var stackResponse = await _client.UpdateByQueryAsync<Stack>(x => x
3636
.QueryOnQueryString("NOT _exists_:status")
3737
.Script(s => s.Source(script).Lang(ScriptLang.Painless))

0 commit comments

Comments
 (0)