Skip to content

Commit

Permalink
Merge pull request #598 from DFE-Digital/feature/add-trust-reference-…
Browse files Browse the repository at this point in the history
…number-to-transfer-project

fix to only bring back projects to enrich which have a trust reference number
  • Loading branch information
paullocknimble authored Oct 29, 2024
2 parents 6d54e7a + ab20913 commit 5f68cc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ private static IQueryable<Project> FilterGroupedProjects(IQueryable<Project> que
public async Task<IEnumerable<IProject>?> GetIncompleteProjects()
{
var createdProjectState = await _context.Projects
.Where(p => string.IsNullOrEmpty(p.Details.LocalAuthority) || string.IsNullOrEmpty(p.Details.Region) || string.IsNullOrEmpty(p.Details.SchoolPhase) || string.IsNullOrEmpty(p.Details.SchoolType) || (p.Details.TrustUkprn == null && p.Details.IsFormAMat == false))
.Where(p =>
string.IsNullOrEmpty(p.Details.LocalAuthority) ||
string.IsNullOrEmpty(p.Details.Region) ||
string.IsNullOrEmpty(p.Details.SchoolPhase) ||
string.IsNullOrEmpty(p.Details.SchoolType) ||
// we need projects that have a trust associated that aren't form a mat that require a trust ukprn
(p.Details.TrustUkprn == null && p.Details.IsFormAMat == false && p.Details.TrustReferenceNumber != null))
.ToListAsync();

return createdProjectState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System.Net.Http.Json;
using Dfe.Academies.Academisation.Data.Http;
using Dfe.Academies.Academisation.Data.ProjectAggregate;
using Dfe.Academies.Academisation.Data.ProjectAggregate;
using Dfe.Academies.Academisation.Domain.ApplicationAggregate;
using Dfe.Academies.Academisation.IService.Commands.Legacy.Project;
using Dfe.Academies.Academisation.IService.Query;
using Dfe.Academies.Academisation.IService.ServiceModels.Academies;
using Dfe.Academies.Academisation.IService.ServiceModels.Legacy.ProjectAggregate;
using Dfe.Academies.Academisation.Service.Mappers.Legacy.ProjectAggregate;
using Dfe.Academies.Contracts.V4.Establishments;
using Dfe.Academies.Contracts.V4.Trusts;
using Dfe.Academisation.CorrelationIdMiddleware;
using Microsoft.Extensions.Logging;

namespace Dfe.Academies.Academisation.Service.Commands.Legacy.Project
Expand Down

0 comments on commit 5f68cc6

Please sign in to comment.