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

Update Day Calculations to not count pauses AFTER decision_date #1716

Merged
merged 1 commit into from
May 28, 2024

Conversation

dhaselhan
Copy link
Collaborator

No description provided.

"alcs"."notice_of_intent"
LEFT JOIN "alcs"."notice_of_intent_meeting" ON
"notice_of_intent"."uuid" = "notice_of_intent_meeting"."notice_of_intent_uuid"
AND start_date <= COALESCE("decision_date", NOW())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was changed, adding AND start_date <= COALESCE("decision_date", NOW())

COALESCE(t1.end_date, NOW()) >= t2.start_date
AND COALESCE(t1.end_date, NOW()) < COALESCE(t2.end_date, NOW()) --- use coalesce since end_date may be null
AND t1.application_uuid = t2.application_uuid)
LEFT JOIN alcs.application ON application.uuid = s1.application_uuid
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This join was added

AND s1.start_date <= COALESCE(s2.end_date, NOW())
AND s1.application_uuid = s2.application_uuid)
AND s1.application_uuid = ANY (p_ids)
AND s1.start_date <= COALESCE(application.decision_date, NOW())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this AND here

Copy link
Collaborator

@mhuseinov mhuseinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dhaselhan dhaselhan merged commit 6377467 into develop May 28, 2024
3 checks passed
@dhaselhan dhaselhan deleted the feature/ALCS-1977 branch May 28, 2024 17:19
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