Skip to content

Commit ebedf2d

Browse files
committed
v2.1
1 parent 1378224 commit ebedf2d

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

src/Server/Coderr.Server.SqlServer/Coderr.Server.SqlServer.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@
2626
<EmbeddedResource Include="Schema\*.sql" />
2727
</ItemGroup>
2828

29-
<ItemGroup>
30-
<None Remove="Schema\Coderr.v19.sql" />
31-
</ItemGroup>
3229
</Project>

src/Server/Coderr.Server.SqlServer/Core/Applications/Queries/GetApplicationOverviewHandler.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ public async Task<GetApplicationOverviewResult> HandleAsync(IMessageContext cont
5757
filter1 = "WHERE ";
5858
filter2 = "WHERE ";
5959
}
60-
var sql = @"select cast(Incidents.CreatedAtUtc as date), count(Id)
60+
var sql = @"select cast(Incidents.CreatedAtUtc as date), count(Incidents.Id)
6161
from Incidents
6262
{2} Incidents.CreatedAtUtc >= @minDate
6363
AND Incidents.CreatedAtUtc <= GetUtcDate()
6464
{0}
6565
group by cast(Incidents.CreatedAtUtc as date);
66-
select cast(IncidentReports.CreatedAtUtc as date), count(Id)
66+
select cast(IncidentReports.ReceivedAtUtc as date), count(IncidentReports.Id)
6767
from IncidentReports
6868
join Incidents isa ON (isa.Id = IncidentReports.IncidentId)
6969
{3} IncidentReports.ReceivedAtUtc >= @minDate
@@ -135,7 +135,8 @@ JOIN IncidentVersions ON (IncidentReports.IncidentId = IncidentVersions.Incident
135135
AND ReceivedAtUtc <= GetUtcDate()
136136
AND ApplicationId = @appId;
137137
138-
SELECT count(distinct emailaddress) from IncidentFeedback
138+
SELECT count(distinct emailaddress)
139+
from IncidentFeedback
139140
JOIN IncidentVersions ON (IncidentFeedback.IncidentId = IncidentVersions.IncidentId)
140141
WHERE IncidentVersions.VersionId = @versionId
141142
AND CreatedAtUtc >= @minDate
@@ -144,7 +145,8 @@ JOIN IncidentVersions ON (IncidentFeedback.IncidentId = IncidentVersions.Inciden
144145
AND emailaddress is not null
145146
AND DATALENGTH(emailaddress) > 0;
146147
147-
select count(*) from IncidentFeedback
148+
select count(*)
149+
from IncidentFeedback
148150
JOIN IncidentVersions ON (IncidentFeedback.IncidentId = IncidentVersions.IncidentId)
149151
WHERE IncidentVersions.VersionId = @versionId
150152
AND CreatedAtUtc >= @minDate
@@ -163,21 +165,23 @@ AND Description is not null
163165
AND Incidents.State <> {(int)IncidentState.Ignored}
164166
AND Incidents.State <> {(int)IncidentState.Closed};
165167
166-
SELECT count(id)
168+
SELECT count(IncidentReports.id)
167169
FROM IncidentReports
168170
JOIN Incidents ON (Incidents.Id = IncidentReports.IncidentId)
169171
WHERE ReceivedAtUtc >= @minDate
170172
AND ReceivedAtUtc <= GetUtcDate()
171173
AND ApplicationId = @appId;
172174
173-
select count(distinct emailaddress) from IncidentFeedback
175+
select count(distinct emailaddress)
176+
from IncidentFeedback
174177
where CreatedAtUtc >= @minDate
175178
AND CreatedAtUtc <= GetUtcDate()
176179
AND ApplicationId = @appId
177180
AND emailaddress is not null
178181
AND DATALENGTH(emailaddress) > 0;
179182
180-
select count(*) from IncidentFeedback
183+
select count(*)
184+
from IncidentFeedback
181185
where CreatedAtUtc >= @minDate
182186
AND CreatedAtUtc <= GetUtcDate()
183187
AND ApplicationId = @appId

src/Server/Coderr.Server.SqlServer/ReportAnalyzer/Feedback/LookupReportsForFeedback.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ private async Task LookupReportInfo(IEnumerable<UserFeedback> items)
8888
{
8989
if (item.ErrorId != null)
9090
{
91-
cmd.CommandText = @"SELECT Id, ApplicationId, IncidentId
92-
FROM IncidentReports WITH(NOLOCK)
93-
JOIN Incidents ON (Incidents.Id = IncidentId) WITH(NOLOCK)
91+
cmd.CommandText = @"SELECT IncidentReports.Id, ApplicationId, IncidentId
92+
FROM IncidentReports
93+
JOIN Incidents WITH(READUNCOMMITTED) ON (Incidents.Id = IncidentId)
9494
WHERE ErrorId = @id";
9595
cmd.AddParameter("id", item.ErrorId);
9696
}
9797
else
9898
{
9999
cmd.CommandText = @"SELECT Id, ApplicationId, IncidentId
100-
FROM ErrorReports WITH(NOLOCK)
100+
FROM ErrorReports
101101
WHERE Id = @id";
102102
cmd.AddParameter("id", item.ReportId);
103103
}

src/Server/Coderr.Server.Web/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
} ,
66
"EnableCors": true,
77
"ConnectionStrings": {
8-
"Db": "Data Source=.;Initial Catalog=Coderr99;Integrated Security=True;Connect Timeout=15;"
8+
"Db": "Data Source=.;Initial Catalog=CoderrDep;Integrated Security=True;Connect Timeout=15;"
99
},
1010
"Logging": {
1111
"IncludeScopes": false,

0 commit comments

Comments
 (0)