Skip to content

Commit 8a3a531

Browse files
committed
Made NumberOfDevelopers nullable
1 parent 2b46cc2 commit 8a3a531

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

src/Server/Coderr.Server.Api/Core/Applications/ApplicationListItem.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ protected ApplicationListItem()
4040
public string Name { get; set; }
4141

4242
/// <summary>
43-
/// User that requested this list is the admin of the specified application.
43+
/// User that requested this list is the admin of the specified application.
4444
/// </summary>
4545
public bool IsAdmin { get; set; }
4646

4747
/// <summary>
48-
/// Number of full time developers.
48+
/// Number of full time developers.
4949
/// </summary>
50-
public decimal NumberOfDevelopers { get; set; }
50+
/// <value>
51+
/// null = not specified
52+
/// </value>
53+
public decimal? NumberOfDevelopers { get; set; }
5154
}
5255
}

src/Server/Coderr.Server.Api/Core/Applications/Queries/GetApplicationInfoResult.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ public class GetApplicationInfoResult
3535
/// </summary>
3636
public int TotalIncidentCount { get; set; }
3737

38+
/// <summary>
39+
/// Number of full time developers working on this application (1.5 = one full time and one half time)
40+
/// </summary>
41+
/// <remarks>
42+
///<para>
43+
///null = not specified
44+
/// </para>
45+
/// </remarks>
46+
public decimal? NumberOfDevelopers { get; set; }
47+
3848
/// <summary>
3949
/// Versions that we have received error reports for.
4050
/// </summary>

src/Server/Coderr.Server.App/Core/Applications/QueryHandlers/GetApplicationInfoHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public async Task<GetApplicationInfoResult> HandleAsync(IMessageContext context,
6464
SharedSecret = app.SharedSecret,
6565
TotalIncidentCount = totalCount,
6666
Versions = versions.ToArray(),
67-
ShowStatsQuestion = !app.MuteStatisticsQuestion
67+
ShowStatsQuestion = !app.MuteStatisticsQuestion,
68+
NumberOfDevelopers = app.NumberOfFtes
6869
};
6970
}
7071
}

src/Server/Coderr.Server.Domain/Core/Applications/UserApplication.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public class UserApplication
2323
/// <summary>
2424
/// Number of full time developers.
2525
/// </summary>
26-
public decimal NumberOfDevelopers { get; set; }
26+
public decimal? NumberOfDevelopers { get; set; }
2727
}
2828
}

src/Server/Coderr.Server.SqlServer/Core/Applications/ApplicationRepository.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ JOIN ApplicationMembers ON (ApplicationMembers.ApplicationId = a.Id)
4242
var apps = new List<UserApplication>();
4343
while (await reader.ReadAsync())
4444
{
45+
var numberOfDevelopers = reader.GetValue(3);
4546
var a = new UserApplication
4647
{
4748
IsAdmin = reader.GetString(2).Contains("Admin"),
4849
ApplicationName = reader.GetString(1),
4950
ApplicationId = reader.GetInt32(0),
50-
NumberOfDevelopers = reader.GetDecimal(3)
51+
NumberOfDevelopers = numberOfDevelopers is DBNull ? null : (decimal?)numberOfDevelopers
5152
};
5253
apps.Add(a);
5354
}

0 commit comments

Comments
 (0)