Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed Asset and retirement update query #332

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Conversation

AjitPadhi-Microsoft
Copy link
Contributor

@AjitPadhi-Microsoft AjitPadhi-Microsoft commented Feb 3, 2025

Purpose

This pull request includes significant changes to the get_users function in ClientAdvisor/App/app.py to improve the calculation and update of dates in the ClientMeetings, Assets, and Retirement tables. Additionally, the test for this function has been updated to reflect these changes.

Changes to date calculations and updates:

  • ClientAdvisor/App/app.py: Replaced the individual queries and updates for ClientMeetings, Assets, and Retirement tables with a combined SQL statement that calculates the date differences for all three tables at once. This includes creating common table expressions (CTEs) for maximum dates and today's date, and calculating the days and months differences.
  • ClientAdvisor/App/app.py: Updated the logic to fetch the calculated differences and apply them conditionally to update the ClientMeetings, Assets, and Retirement tables only if the differences are greater than zero.

Test updates:

  • ClientAdvisor/App/tests/test_app.py: Added new fields (ClientMeetingDaysDifference, AssetMonthsDifference, StatusMonthsDifference, DaysDifference) to the test data in test_get_users_success to reflect the changes in the date calculations and updates.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit 951fa25 into dev Feb 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants