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

Issue #397: Fixed aliases in HQL query of DJOBS_CreateFromOrders. #436

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

Matias-Bernal
Copy link
Collaborator

EPL-1505: Fixed projection aliases in HQL query of DJOBS_CreateFromOrders table to allow added new fields on query projections.

EPL-1505: Fixed projection aliases in HQL query of DJOBS_CreateFromOrders table to allow added new fields on query projections.
@etendobot
Copy link
Collaborator

Warning

Git Police 👮

Invalid pull request title. Make sure it contains the appropriate issue/task reference and is descriptive of the change made.

For more information, visit: Methodology for repository managment

This comment has been minimized.

@Matias-Bernal Matias-Bernal changed the title Hotfix EPL-1505: Fixed aliases in HQL query of DJOBS_CreateFromOrders. Issue #397: Fixed aliases in HQL query of DJOBS_CreateFromOrders. Jul 3, 2024
@Matias-Bernal Matias-Bernal reopened this Jul 3, 2024
Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage No coverage information (0.00% Estimated after merge)
  • Duplications No duplication information (13.20% Estimated after merge)

Project ID: etendosoftware_etendo_core_AYOKvQCAuJ79WHyLB97g

View in SonarQube

Copy link
Collaborator

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

Copy link
Collaborator

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

@valeg-etendo valeg-etendo added the bug Something isn't working label Jul 5, 2024
@Matias-Bernal Matias-Bernal merged commit 024a20b into main Jul 5, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants