Skip to content

chore: DTOSS-11408 remove service now cohort lookup function#1770

Open
SamAinsworth-NHS wants to merge 20 commits intomainfrom
chore/DTOSS-11408-remove-ServiceNowCohortLookup-function
Open

chore: DTOSS-11408 remove service now cohort lookup function#1770
SamAinsworth-NHS wants to merge 20 commits intomainfrom
chore/DTOSS-11408-remove-ServiceNowCohortLookup-function

Conversation

@SamAinsworth-NHS
Copy link
Copy Markdown
Contributor

@SamAinsworth-NHS SamAinsworth-NHS commented Nov 25, 2025

Description

  • Remove deprecated ServiceNowCohortLookup Azure Function and all related assets (project, Dockerfile, host/config, solution entry, and unit tests).
  • Integrate ServiceNow case status update into Cohort Distribution flow via new activity in DistributeParticipant (updates case status on arrival into distribution).
  • Update application compose and configuration to reflect removal and new dependency wiring.
  • Adjust Terraform environment .tfvars to drop lookup function references and add the new required data service setting.
  • Add targeted unit tests for the new ServiceNow case status update behavior; remove obsolete tests for the deleted function.

Key changes by area:

  • Functions: deleted ServiceNowIntegration/ServiceNowCohortLookup/*; updated CohortDistributionServices/DistributeParticipant/* to include DistributeParticipantActivities and config wiring.
  • Infrastructure: updated infrastructure/tf-core/environments/*.tfvars and cleaned solution Functions.sln.
  • Tests: added UpdateServiceNowCaseStatusTests.cs; updated DistributeParticipant tests; removed ServiceNowCohortLookupTests.

Deployment notes:

  • This removes a deployed Azure Function. Ensure any external references to ServiceNowCohortLookup are retired before deploy.
  • Apply Terraform with updated *.tfvars to propagate the new data service setting across environments.

Context

  • The standalone ServiceNow cohort lookup function is no longer required and duplicated responsibility with the distribution pipeline.
  • Consolidating ServiceNow interactions within the Cohort Distribution flow reduces operational surface area, simplifies infrastructure, and removes an extra Function app/container to maintain.
  • Adding a direct status update on cohort arrival improves data freshness and aligns with expected ServiceNow workflow.

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-11408

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@SamAinsworth-NHS SamAinsworth-NHS changed the title Chore/dtoss 11408 remove service now cohort lookup function chore: dtoss 11408 remove service now cohort lookup function Nov 25, 2025
@SamAinsworth-NHS SamAinsworth-NHS changed the title chore: dtoss 11408 remove service now cohort lookup function chore: DTOSS-11408 remove service now cohort lookup function Nov 25, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 25, 2025

Unit Test Results

✔️ Tests 1034 / 1034 - passed in 73.8s
📝 Coverage 47.68%
📏 4876 / 10525 lines covered 🌿 1205 / 2228 branches covered
🔍 click here for more details

✏️ updated for commit d7aba1f

@NHSDigital NHSDigital deleted a comment from github-actions Bot Nov 26, 2025
…p-function; keep ServiceNowCohortLookupTests deleted per branch scope
@SamAinsworth-NHS SamAinsworth-NHS marked this pull request as ready for review December 1, 2025 11:41
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 1, 2025

@rfk-nc rfk-nc marked this pull request as draft December 12, 2025 09:22
@stephhou stephhou added Deployment 1.1.0 Release scheduled for February 2026 Non-functional change A change that does not change any functions. Mainly config or database changes and removed Deployment 1.0.6 labels Feb 6, 2026
@MWClayson-NHS MWClayson-NHS removed the Deployment 1.1.0 Release scheduled for February 2026 label Feb 23, 2026
@MWClayson-NHS
Copy link
Copy Markdown
Contributor

@hardik-desai-nhs to pick this up

@hardik-desai-nhs hardik-desai-nhs marked this pull request as ready for review April 13, 2026 15:16
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Non-functional change A change that does not change any functions. Mainly config or database changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants