-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue #397: Fixed aliases in HQL query of DJOBS_CreateFromOrders. #436
Conversation
EPL-1505: Fixed projection aliases in HQL query of DJOBS_CreateFromOrders table to allow added new fields on query projections.
Warning Git Police 👮Invalid pull request title. Make sure it contains the appropriate issue/task reference and is descriptive of the change made.
|
This comment has been minimized.
This comment has been minimized.
modules_core/com.smf.jobs.defaults/src-db/database/sourcedata/AD_TABLE.xml
Show resolved
Hide resolved
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.
GPT Review for AD_TABLE.xml
Review
- Estimated effort to review [1-5]: 2, because the changes are straightforward and involve renaming columns for consistency. The changes are easy to understand and verify.
- Score: 95
Code feedback
- File:
modules_core/com.smf.jobs.defaults/src-db/database/sourcedata/AD_TABLE.xml - Language:
xml - Suggestion:
Ensure that the column aliases are consistent and follow the naming conventions used throughout the project. This helps maintain readability and consistency in the codebase. [important] - Label:
best practice - Existing code:
ic.documentNo as documentNo,
bp.name as cbpartnername,
ic.orderDate as orderDate,
- Improved code:
ic.documentNo as documentNo,
bp.name as cbpartnerName,
ic.orderDate as orderDate,
- File:
modules_core/com.smf.jobs.defaults/src-db/database/sourcedata/AD_TABLE.xml - Language:
xml - Suggestion:
Ensure that the column aliases are consistent and follow the naming conventions used throughout the project. This helps maintain readability and consistency in the codebase. [important] - Label:
best practice - Existing code:
ic.term as TermName,
ic.orderedQuantity as orderedQuantity,
ic.deliveredQuantity as deliveredQuantity,
- Improved code:
ic.term as termName,
ic.orderedQuantity as orderedQuantity,
ic.deliveredQuantity as deliveredQuantity,
- File:
modules_core/com.smf.jobs.defaults/src-db/database/sourcedata/AD_TABLE.xml - Language:
xml - Suggestion:
Ensure that the column aliases are consistent and follow the naming conventions used throughout the project. This helps maintain readability and consistency in the codebase. [important] - Label:
best practice - Existing code:
ic.creationDate as creationDate,
ic.createdBy as createdBy,
ic.updated as updated,
ic.updatedBy as updatedBy
- Improved code:
ic.creationDate as creationDate,
ic.createdBy as createdBy,
ic.updated as updated,
ic.updatedBy as updatedBy
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.
GPT Review for AD_TABLE.xml
Review
- Estimated effort to review [1-5]: 2, because the changes are straightforward and mostly involve renaming columns for consistency. The review is simple but requires careful checking to ensure all renames are correct and consistent.
- Score: 95
Code feedback
- File:
modules_core/com.smf.jobs.defaults/src-db/database/sourcedata/AD_TABLE.xml - Language:
xml - Suggestion:
Ensure that the column aliases are consistently named throughout the entire XML file. This helps maintain readability and reduces the risk of errors in future modifications. [important] - Label:
best practice - Existing code:
ic.salesOrder.id,
o.name as adorgname,
ic.documentType as cdoctypename,
ic.documentNo as documentNo,
bp.name as cbpartnername,
ic.orderDate as orderDate,
case when @linesIncludeTaxes@ = 'Y' then ic.amountlinesgross else ic.amountlines end as amountlines,
case
when ic.term = 'N'
then 0.0
else
case when @linesIncludeTaxes@ = 'Y' then ic.notinvoicedlinesgross else ic.notinvoicedlines end
end as notinvoicedlines,
ic.term as TermName,
case
when ic.term = 'N'
then 0.0
else
case when @linesIncludeTaxes@ = 'Y' then ic.pendinglinesgross else ic.pendinglines end
end as pendinglines,
ic.orderedQuantity as orderedQuantity,
ic.deliveredQuantity as deliveredQuantity,
((case when @linesIncludeTaxes@ = 'Y' then ic.amountlinesgross else ic.amountlines end)-(case when @linesIncludeTaxes@ = 'Y' then ic.notinvoicedlinesgross else ic.notinvoicedlines end)) as linesinvoiced,
ic.amountlinesgross as totalgross,
ic.creationDate as creationDate,
ic.createdBy as createdBy,
ic.updated as updated,
ic.updatedBy as updatedBy
- Improved code:
ic.salesOrder.id as salesOrderId,
o.name as adorgname,
ic.documentType as cdoctypename,
ic.documentNo as documentNo,
bp.name as cbpartnername,
ic.orderDate as orderDate,
case when @linesIncludeTaxes@ = 'Y' then ic.amountlinesgross else ic.amountlines end as amountlines,
case
when ic.term = 'N'
then 0.0
else
case when @linesIncludeTaxes@ = 'Y' then ic.notinvoicedlinesgross else ic.notinvoicedlines end
end as notinvoicedlines,
ic.term as termName,
case
when ic.term = 'N'
then 0.0
else
case when @linesIncludeTaxes@ = 'Y' then ic.pendinglinesgross else ic.pendinglines end
end as pendinglines,
ic.orderedQuantity as orderedQuantity,
ic.deliveredQuantity as deliveredQuantity,
((case when @linesIncludeTaxes@ = 'Y' then ic.amountlinesgross else ic.amountlines end)-(case when @linesIncludeTaxes@ = 'Y' then ic.notinvoicedlinesgross else ic.notinvoicedlines end)) as linesinvoiced,
ic.amountlinesgross as totalgross,
ic.creationDate as creationDate,
ic.createdBy as createdBy,
ic.updated as updated,
ic.updatedBy as updatedBy
EPL-1505: Fixed projection aliases in HQL query of DJOBS_CreateFromOrders table to allow added new fields on query projections.