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

10598 Bug: Case Deadlines Blocked Issues in West #5775

Draft
wants to merge 7 commits into
base: staging
Choose a base branch
from

Conversation

Mwindo
Copy link
Contributor

@Mwindo Mwindo commented Feb 13, 2025

Currently, when creating or deleting a case deadline, we immediately thereafter re-fetch the case deadlines as part of updateCaseAutomaticBlock. If we created/deleted the case deadline in the East and then are immediately reading from the West, the West might not yet have the update, which leads to the case not being properly blocked/unblocked.

This PR rectifies the issue by passing in data that results from create/delete rather than re-fetching.

@@ -1411,14 +1411,14 @@ export class Case extends JoiValidationEntity {
* @param {object} caseDeadlines - the case deadlines
* @returns {Case} the updated case entity
*/
updateAutomaticBlocked({ caseDeadlines }) {
updateAutomaticBlocked({ hasCaseDeadline }: { hasCaseDeadline: boolean }) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed caseDeadlines to hasCaseDeadline because 1) we don't actually need all of the case deadlines, 2) getting all of the case deadlines upon insert would have meant an extra db query following the upsert in createCaseDeadline.ts, and 3) passing in only a subset of deadlines (e.g., the case deadline upserted in createCaseDeadline.ts) seemed misleading to future devs.

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

Successfully merging this pull request may close these issues.

1 participant