-
Notifications
You must be signed in to change notification settings - Fork 9
Add support for pulling specific review summations, not all review su… #174
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
Conversation
| let orderBy; | ||
|
|
||
| const parseBooleanString = (value?: string): boolean | undefined => { | ||
| if (typeof value !== 'string') { |
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.
[correctness]
The parseBooleanString function returns undefined for non-string inputs, which might not be the expected behavior if the input is null or undefined. Consider explicitly handling these cases to avoid potential issues in the calling code.
| queryDto.isFinal.toLowerCase() === 'true'; | ||
| if (isFinalFilter !== undefined) { | ||
| reviewSummationWhereClause.isFinal = isFinalFilter; | ||
| } else if (systemOnly) { |
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.
[correctness]
The logic for setting reviewSummationWhereClause.isFinal when systemOnly is true might lead to unintended behavior if isFinalFilter is explicitly set to false. Consider revisiting this logic to ensure it aligns with the intended functionality.
| queryDto.isProvisional.toLowerCase() === 'true'; | ||
| if (isProvisionalFilter !== undefined) { | ||
| reviewSummationWhereClause.isProvisional = isProvisionalFilter; | ||
| } else if (provisionalOnly) { |
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.
[correctness]
The logic for setting reviewSummationWhereClause.isProvisional when provisionalOnly is true might lead to unintended behavior if isProvisionalFilter is explicitly set to false. Consider revisiting this logic to ensure it aligns with the intended functionality.
| if (isExampleFilter !== undefined) { | ||
| reviewSummationWhereClause.isExample = isExampleFilter; | ||
| } else if (exampleOnly) { | ||
| reviewSummationWhereClause.isExample = true; |
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.
[correctness]
The logic for setting reviewSummationWhereClause.isExample when exampleOnly is true might lead to unintended behavior if isExampleFilter is explicitly set to false. Consider revisiting this logic to ensure it aligns with the intended functionality.
| }) | ||
| @IsOptional() | ||
| @IsBooleanString() | ||
| example?: string; |
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.
[maintainability]
The example property appears to duplicate the functionality of the existing isExample property. Consider whether both are necessary or if one can be removed to avoid redundancy.
| }) | ||
| @IsOptional() | ||
| @IsBooleanString() | ||
| provisional?: string; |
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.
[maintainability]
The provisional property seems to overlap with the existing isProvisional property. Evaluate if both are needed or if this introduces unnecessary complexity.
| }) | ||
| @IsOptional() | ||
| @IsBooleanString() | ||
| system?: string; |
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.
[maintainability]
The system property may be redundant with the existing isFinal property. Consider consolidating these to simplify the DTO.
…mmations