Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7275

Adding condition in price rule on 'Role Type' showing incorrect result

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk, Release Branch 16.11
    • Fix Version/s: None
    • Component/s: product
    • Labels:
      None

      Description

      Steps to regenerate issue:
      1. Create a price rule or open an existing one.
      2. Add a condition, select input 'Role Type', operator 'Is' and select the value 'Customer'.

      Expected Result: For added condition value should be 'Customer'.

      Actual Result: It's showing value 'Ship-To Customer'.

      1. OFBIZ-7275.patch
        0.9 kB
        Aditi Patidar
      2. OFBIZ-7275.png
        207 kB
        Aditi Patidar

        Activity

        Hide
        aditi17 Aditi Patidar added a comment -

        Findings on the issue:
        Entity 'ProductPriceCond' holds the correct value for this condition being added, it's a just problem on UI.

        On browser console, all the options are showing selected which contains substring "CUSTOMER" as value and the last one selected option which is 'SHIP_TO_CUSTOMER' get shown. View the screenshot for this occurrence.

        Show
        aditi17 Aditi Patidar added a comment - Findings on the issue: Entity 'ProductPriceCond' holds the correct value for this condition being added, it's a just problem on UI. On browser console, all the options are showing selected which contains substring "CUSTOMER" as value and the last one selected option which is 'SHIP_TO_CUSTOMER' get shown. View the screenshot for this occurrence.
        Hide
        aditi17 Aditi Patidar added a comment -

        The issue exists because in role type list there are multiple occurrences of substring "CUSTOMER" and the existing check was just checking the occurrence of a substring in the string and found this value more than once in the list so the last option gets selected.

        Applied the equality check to find the exact match.

        Show
        aditi17 Aditi Patidar added a comment - The issue exists because in role type list there are multiple occurrences of substring "CUSTOMER" and the existing check was just checking the occurrence of a substring in the string and found this value more than once in the list so the last option gets selected. Applied the equality check to find the exact match.
        Hide
        pandeypranay Pranay Pandey added a comment -

        Patch committed to trunk at r1802690 and R16.11 at r1802691 and r1802692.

        Thanks Aditi Patidar for reporting and providing the patch.

        Show
        pandeypranay Pranay Pandey added a comment - Patch committed to trunk at r1802690 and R16.11 at r1802691 and r1802692. Thanks Aditi Patidar for reporting and providing the patch.

          People

          • Assignee:
            pandeypranay Pranay Pandey
            Reporter:
            aditi17 Aditi Patidar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development