diff --git a/src/Server/Coderr.Server.Api/Core/Incidents/Events/IncidentAssigned.cs b/src/Server/Coderr.Server.Api/Core/Incidents/Events/IncidentAssigned.cs index 3af7e93d..bc2e19e2 100644 --- a/src/Server/Coderr.Server.Api/Core/Incidents/Events/IncidentAssigned.cs +++ b/src/Server/Coderr.Server.Api/Core/Incidents/Events/IncidentAssigned.cs @@ -45,7 +45,7 @@ protected IncidentAssigned() /// /// When the incident was assigned (client side) /// - public DateTime AssignedAtUtc { get; private set; } + public DateTime AssignedAtUtc { get; private set; } /// /// Incident being assigned diff --git a/src/Server/Coderr.Server.App/Core/Accounts/AccountService.cs b/src/Server/Coderr.Server.App/Core/Accounts/AccountService.cs index 02a42253..bf986609 100644 --- a/src/Server/Coderr.Server.App/Core/Accounts/AccountService.cs +++ b/src/Server/Coderr.Server.App/Core/Accounts/AccountService.cs @@ -86,9 +86,10 @@ public async Task ActivateAccount(ClaimsPrincipal user, string a throw new ArgumentOutOfRangeException("ActivationKey", activationKey, "Key was not found."); + account.Activate(); await _repository.UpdateAsync(account); - + if (!user.IsCurrentAccount(account.Id)) { diff --git a/src/Server/Coderr.Server.ReportAnalyzer/Incidents/IncidentBeingAnalyzed.cs b/src/Server/Coderr.Server.ReportAnalyzer/Incidents/IncidentBeingAnalyzed.cs index 4c542907..d9ccced3 100644 --- a/src/Server/Coderr.Server.ReportAnalyzer/Incidents/IncidentBeingAnalyzed.cs +++ b/src/Server/Coderr.Server.ReportAnalyzer/Incidents/IncidentBeingAnalyzed.cs @@ -92,6 +92,11 @@ public string Description set => _description = value; } + /// + /// List of all environment names that the developer specified when reporting the errors. + /// + public string[] EnvironmentNames { get; set; } + /// /// Full name of the exception message. /// diff --git a/src/Server/Coderr.Server.SqlServer/Core/Accounts/AccountRepository.cs b/src/Server/Coderr.Server.SqlServer/Core/Accounts/AccountRepository.cs index 36ac39a7..4611842a 100644 --- a/src/Server/Coderr.Server.SqlServer/Core/Accounts/AccountRepository.cs +++ b/src/Server/Coderr.Server.SqlServer/Core/Accounts/AccountRepository.cs @@ -16,6 +16,7 @@ namespace Coderr.Server.SqlServer.Core.Accounts public class AccountRepository : IAccountRepository { private readonly IAdoNetUnitOfWork _uow; + private ILog _logger = LogManager.GetLogger(typeof(AccountRepository)); public AccountRepository(IAdoNetUnitOfWork uow) { @@ -43,7 +44,12 @@ public async Task FindByActivationKeyAsync(string activationKey) { cmd.CommandText = "SELECT * FROM Accounts WHERE ActivationKey=@key"; cmd.AddParameter("key", activationKey); - return await cmd.FirstOrDefaultAsync(new AccountMapper()); + var accounts= await cmd.ToListAsync(new AccountMapper()); + if (accounts.Count == 0) + return null; + + _logger.Error($"Found {accounts.Count} accounts, expected one."); + return accounts.First(); } } diff --git a/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/AnalyticsRepository.cs b/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/AnalyticsRepository.cs index 5ae3c1c2..ad57e0d2 100644 --- a/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/AnalyticsRepository.cs +++ b/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/AnalyticsRepository.cs @@ -113,7 +113,7 @@ from Environments begin INSERT INTO IncidentEnvironments (IncidentId, EnvironmentId) SELECT @incidentId, @environmentId - WHERE NOT EXISTS (SELECT IncidentId, EnvironmentId FROM IncidentEnvironment + WHERE NOT EXISTS (SELECT IncidentId, EnvironmentId FROM IncidentEnvironments WHERE IncidentId=@incidentId AND EnvironmentId=@environmentId) end;"; cmd.AddParameter("incidentId", incidentId); diff --git a/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/ErrorReportEntityMapper.cs b/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/ErrorReportEntityMapper.cs index 56b774de..833e39a5 100644 --- a/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/ErrorReportEntityMapper.cs +++ b/src/Server/Coderr.Server.SqlServer/ReportAnalyzer/ErrorReportEntityMapper.cs @@ -20,6 +20,9 @@ public ErrorReportEntityMapper() : base("ErrorReports") .ToPropertyValue(x => null) .ToColumnValue(x => ""); + Property(x => x.EnvironmentName) + .Ignore(); + Property(x => x.ClientReportId) .ColumnName("ErrorId"); diff --git a/src/Server/Coderr.Server.Web/ClientApp/components/analyze/analyze.vue.html b/src/Server/Coderr.Server.Web/ClientApp/components/analyze/analyze.vue.html index e1b4fad2..4ce43a1f 100644 --- a/src/Server/Coderr.Server.Web/ClientApp/components/analyze/analyze.vue.html +++ b/src/Server/Coderr.Server.Web/ClientApp/components/analyze/analyze.vue.html @@ -1,7 +1,7 @@