Skip to content

Commit 27e7152

Browse files
committed
corrected issue #61 and #60
1 parent 192054c commit 27e7152

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/Server/Coderr.Server.Api/Core/Incidents/Queries/FindIncidents.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public FindIncidents()
2727
/// <summary>
2828
/// Find incidents assigned to the specified user
2929
/// </summary>
30-
public int AccountId { get; set; }
30+
public int AssignedToId { get; set; }
3131

3232
/// <summary>
3333
/// Empty = find for all applications

src/Server/Coderr.Server.SqlServer/Analysis/Jobs/InsertCollectionsJob.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public async Task ExecuteAsync()
4646
_importer.Clear();
4747
}
4848

49-
_dbContext.SaveChanges();
49+
// _dbContext.SaveChanges();
5050
}
5151

5252

src/Server/Coderr.Server.SqlServer/Analysis/Jobs/RemoveOldCollectionDataJob.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task ExecuteAsync()
3434
var reportIds = new List<int>();
3535
using (var cmd = _analysisDbContext.UnitOfWork.CreateDbCommand())
3636
{
37-
cmd.CommandText = "SELECT TOP(10) Id, ContextInfo FROM ErrorReports WHERE ContextInfo != ''";
37+
cmd.CommandText = "SELECT TOP(10) Id, ContextInfo FROM ErrorReports WHERE cast([ContextInfo] as nvarchar(max)) != ''";
3838
using (var reader = await cmd.ExecuteReaderAsync())
3939
{
4040
while (await reader.ReadAsync())
@@ -70,8 +70,6 @@ public async Task ExecuteAsync()
7070
}
7171
}
7272
}
73-
74-
_analysisDbContext.SaveChanges();
7573
}
7674
}
7775
}

src/Server/Coderr.Server.SqlServer/Core/Incidents/Queries/FindIncidentsHandler.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ OR ErrorReports.Title LIKE @FreeText
155155
cmd.AddParameter("maxDate", query.MaxDate);
156156
}
157157

158-
if (query.AccountId > 0)
158+
if (query.AssignedToId > 0)
159159
{
160160
sqlQuery += "AND AssignedToId = @assignedTo";
161-
cmd.AddParameter("assignedTo", query.AccountId);
161+
cmd.AddParameter("assignedTo", query.AssignedToId);
162162
}
163163

164164

src/Server/Coderr.Server.Web/App_Start/Services/ServiceRunner.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,13 @@ private void OnBackgroundJobScopeClosing(object sender, ScopeClosingEventArgs e)
229229
{
230230
try
231231
{
232-
e.Scope.Resolve<IAdoNetUnitOfWork>().SaveChanges();
232+
if (e.Successful)
233+
e.Scope.Resolve<IAdoNetUnitOfWork>().SaveChanges();
233234
}
234235
catch (Exception exception)
235236
{
236-
Err.Report(e.Exception);
237-
_log.Error("Failed to close scope. Err: " + exception, e.Exception);
237+
Err.Report(exception);
238+
_log.Error("Failed to close scope.", exception);
238239
}
239240
}
240241

src/Server/Coderr.Server.Web/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
// You can specify all the values or you can default the Revision and Build Numbers
3535
// by using the '*' as shown below:
3636

37-
[assembly: AssemblyVersion("1.1.3.0")]
38-
[assembly: AssemblyFileVersion("1.1.3.0")]
37+
[assembly: AssemblyVersion("1.1.4.0")]
38+
[assembly: AssemblyFileVersion("1.1.4.0")]

src/Server/Coderr.Server.Web/Scripts/Models/AllModels.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Server/Coderr.Server.Web/Scripts/Models/AllModels.ts

+1
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ module codeRR.Core.Incidents.Queries {
721721
public SortType: codeRR.Core.Incidents.IncidentOrder;
722722
public Version: string;
723723
public Tags: string[];
724+
public AssignedToId: number;
724725
}
725726

726727
export class FindIncidentsResult {

0 commit comments

Comments
 (0)