Skip to content

Commit

Permalink
Fixes #745 Added extra check to set stack status migration
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 18, 2020
1 parent 0ca932e commit e515c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Exceptionless.Core/Migrations/002_SetStackStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override async Task RunAsync(MigrationContext context) {

_logger.LogInformation("Start migrating stacks status");
var sw = Stopwatch.StartNew();
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';";
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';";
var stackResponse = await _client.UpdateByQueryAsync<Stack>(x => x
.QueryOnQueryString("NOT _exists_:status")
.Script(s => s.Source(script).Lang(ScriptLang.Painless))
Expand Down

0 comments on commit e515c19

Please sign in to comment.