Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Update specific investment programme payload field #985

Merged

Conversation

oliverjwroberts
Copy link
Contributor

@oliverjwroberts oliverjwroberts commented Jul 17, 2024

Description of change

Due to recent changes to the specific_programme field in Data Hub API (converted from foreign key to many-to-many and renamed), the field requirements in the payload that EMT sends to DataHub when creating an investment project have changed. Currently, the integration is broken and the specific programme is not recorded in the created project.

This PR applies these changes to ensure that created investment projects will record the specific investment programme data.

  • Adds an 's' to the field name
  • Ensures the payload value is a list of ID's, instead of a single ID

Test instructions

If you create an enquiry in EMT, the enquiry's specific investment programme should now be visible in the created Data Hub investment project.

  • Create an enquiry using the CSV template provided on the ‘Import enquiries’ page in EMT
  • Submit the enquiry to DataHub; you may need to add additional information to the enquiry via the UI
  • In DataHub, review the created investment project and check that the specific investment programme data has successfully been added to the new project

As a side note, we probably need to further test the interaction between EMT and DataHub to ensure breaking changes like this don't go under the radar.

…of IDs

This is due to recent changes to the field in Data Hub API, which is now a many-to-many relationship.
@oliverjwroberts oliverjwroberts force-pushed the hotfix/update-specific-investment-programme-payload-field branch from 6f279ed to 2ac9df2 Compare July 18, 2024 07:50
@oliverjwroberts oliverjwroberts marked this pull request as ready for review July 18, 2024 07:54
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.03%. Comparing base (9346367) to head (2ac9df2).

Files Patch % Lines
app/enquiries/common/datahub_utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
- Coverage   69.07%   69.03%   -0.04%     
==========================================
  Files          61       61              
  Lines        2024     2025       +1     
==========================================
  Hits         1398     1398              
- Misses        626      627       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverjwroberts oliverjwroberts merged commit f989654 into main Jul 22, 2024
2 of 4 checks passed
@oliverjwroberts oliverjwroberts deleted the hotfix/update-specific-investment-programme-payload-field branch July 22, 2024 10:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants