Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 13.07, Release Branch 14.12, Trunk
    • Fix Version/s: 16.11.01
    • Component/s: product
    • Labels:
      None
    • Sprint:
      Community Day 4 - 2015

      Description

      There are three sets of dimensions in the Product entity.
      (productHeight, shippingHeight), (productWidth, shippingWidth), (productDepth, shippingDepth) but in case of weight, there is another set of dimension field weight and productWeight which are inconsistent in nature.
      Fix this thing and correct all instances of this in the framework.

      1. OFBIZ-6777.patch
        42 kB
        Suraj Khurana

        Activity

        Hide
        suraj.khurana Suraj Khurana added a comment -

        Copying Jacopo's comment from dev list:
        ================================
        There are indeed some data model inconsistencies in this area.
        After reviewing the commit (817605) that introduced the field productWeight
        I think that the following applies:
        "weight" should be used to specify the "shipping weight" of the product
        "productWeight" should be used to specify the actual weight of the product.

        However since its introduction, productWeight was never used and "weight"
        has been used both to specify the shipping weight and to specify the actual
        weight.

        How can we fix this situation? I see two options:
        1) review all usages of "weight" and fix according to the definition above
        2) rename "productWeight" into "shippingWeight" and fix the codebase to use
        this field only when the shipping weight is required and use "weight" in
        all the other cases.

        Maybe #2 would be easier to implement and would have a limited impact on
        existing instances.
        ===========================

        Show
        suraj.khurana Suraj Khurana added a comment - Copying Jacopo's comment from dev list: ================================ There are indeed some data model inconsistencies in this area. After reviewing the commit (817605) that introduced the field productWeight I think that the following applies: "weight" should be used to specify the "shipping weight" of the product "productWeight" should be used to specify the actual weight of the product. However since its introduction, productWeight was never used and "weight" has been used both to specify the shipping weight and to specify the actual weight. How can we fix this situation? I see two options: 1) review all usages of "weight" and fix according to the definition above 2) rename "productWeight" into "shippingWeight" and fix the codebase to use this field only when the shipping weight is required and use "weight" in all the other cases. Maybe #2 would be easier to implement and would have a limited impact on existing instances. ===========================
        Hide
        suraj.khurana Suraj Khurana added a comment -

        Please use this query as well for MYSQL database:
        ALTER TABLE PRODUCT CHANGE WEIGHT SHIPPING_WEIGHT decimal(18,6);

        Show
        suraj.khurana Suraj Khurana added a comment - Please use this query as well for MYSQL database: ALTER TABLE PRODUCT CHANGE WEIGHT SHIPPING_WEIGHT decimal(18,6);
        Hide
        toashishvijay Ashish Vijaywargiya added a comment -

        Thanks Suraj, Your changes has been committed in trunk at r1720900.

        Show
        toashishvijay Ashish Vijaywargiya added a comment - Thanks Suraj, Your changes has been committed in trunk at r1720900.

          People

          • Assignee:
            toashishvijay Ashish Vijaywargiya
            Reporter:
            suraj.khurana Suraj Khurana
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile