-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
"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()) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this AND here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.