Skip to content

Commit

Permalink
Feat #23812 - Adjust resource owner recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
larfeq committed Oct 25, 2024
1 parent ad97ad8 commit dc56516
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class OrgUnits
public string? FullDepartment { get; set; }
public string? SapId { get; set; }
public Management Management { get; set; }
public int Level { get; set; }
}

public class Management
Expand Down
5 changes: 5 additions & 0 deletions src/backend/api/Fusion.Resources.Api/libman.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private async Task SendResourceOwnersToQueue(ServiceBusSender sender, int totalB
// Query departments from LineOrg
var departments = (await _lineOrgClient.GetOrgUnitDepartmentsAsync())
.Where(d => d.FullDepartment != null) // Exclude departments with blank department name
.Where(d => d.FullDepartment.Contains("PRD"))
.Where(d => d.Level >= 4) // Only include departments of level 4 and up
.Where(x => x.Management?.Persons.Length > 0) // Exclude departments with no receivers
.ToList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.4.1"/>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.5.0" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.16.4"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0"/>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.16.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Fusion.Resources.Functions.Common\Fusion.Resources.Functions.Common.csproj" />
Expand Down

0 comments on commit dc56516

Please sign in to comment.