Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046818
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2021-05-25 07:552021-06-01 13:38
ReporterjetxarriView Statuspublic 
Assigned ToRetail 
PriorityhighResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR20Q3.4SCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046818: Endpoint ws/org.openbravo.discounts.discount performance improvement

DescriptionCurrently every time that a call is done to endpoint "ws/org.openbravo.discounts.discount" to calculate ticket discount, for each discount id is going to execute "addDataToDiscount" to complete the information about the discount.

This is not a problem if we understand the process like something completely independent, but it will be interesting to create something like a discounts cache to avoid this step.

The code lines are:

dataHookSelector.getDiscountDataHooks(pa.getDiscountType().getId())
          .stream()
          .forEach(hook -> hook.addDataToDiscount(pa, discountRule));
Steps To Reproduce-Configure some discounts
-do a call to "https://OPENBRAVOURL/openbravo/ws/org.openbravo.discounts.discount" [^]
-body example
{
  "ticket": {
    "organization": {
      "searchKey": "0003"
    },
    "businessPartner": {
      "searchKey": "0003"
    },
    "orderDate": "2021-05-16T11:54:21",
    "priceIncludesTax": true,
    "discountsFromUser": {},
    "lines": [
      {
        "id": "1",
        "product": {
          "searchKey": "2016871"
        },
        "qty": 1,
        "baseGrossUnitPrice": 49.9
      }
    ]
  }
}

TagsNOR
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0128859)
marvintm (manager)
2021-06-01 13:38

With the latest data available, it seems this problem can be solved by reconfiguring the combo discounts in the system. If this changes at some point, lets reopen the issue.

- Issue History
Date Modified Username Field Change
2021-05-25 07:55 jetxarri New Issue
2021-05-25 07:55 jetxarri Assigned To => Retail
2021-05-25 07:55 jetxarri Triggers an Emergency Pack => No
2021-05-25 07:55 jetxarri Tag Attached: NOR
2021-05-25 08:48 rafaroda Issue Monitored: rafaroda
2021-05-25 08:48 rafaroda Resolution time => 1622671200
2021-06-01 13:38 marvintm Review Assigned To => marvintm
2021-06-01 13:38 marvintm Note Added: 0128859
2021-06-01 13:38 marvintm Status new => closed
2021-06-01 13:38 marvintm Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker