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

Product price rule with no conditions.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: product
    • Labels:
      None

      Description

      I'm currently closing pending stuff, here is one

      Skip reported this 2 years ago on user ML:

      I recently had a user accidentially create a product price rule with no
      conditions. This resulted in all products sold afterwards getting the
      discounted price (-5% price) set by the action.

      After tracking this down, I added some code in PriceServices.java to check
      if there were no price conditions and if so, set the local variable alltrue
      to false. This fixes it for me.

      I am debating whether or not to add a Jira for this issue. Was this
      intended and can anyone see any value in this behavior?

      Skip

      I then answered

      I'd create a Jira. It looks like a miss to me, the check you do seems good. I'd
      also prevent users to create such rules from UI
      Maybe we could add a properties, in case someone would like to use a such
      scenario (could be used for temporarily give a percent on all products)?

      Jacques

        Activity

        Hide
        upadhyay.ratnesh Ratnesh Upadhyay added a comment -

        @Jacques, I've reviewed issue details and it seems this is intended behavior of system, if there is no condition available then apply action for all. In this case merchandising manager should be smart enough to take this decision or business can train him to use price rule in this way. We can't prevent user to create such rules as many time business required to perform abc action without any condition.

        I think we can keep the functionality intact and instead we can train our staff on workflow of OFBiz price rule workflow. Lets see what community think about it.

        Show
        upadhyay.ratnesh Ratnesh Upadhyay added a comment - @Jacques, I've reviewed issue details and it seems this is intended behavior of system, if there is no condition available then apply action for all. In this case merchandising manager should be smart enough to take this decision or business can train him to use price rule in this way. We can't prevent user to create such rules as many time business required to perform abc action without any condition. I think we can keep the functionality intact and instead we can train our staff on workflow of OFBiz price rule workflow. Lets see what community think about it.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I finally agree Ratnesh,

        I will simply improve the ProductConditionsThenActions labels and add this information

        Show
        jacques.le.roux Jacques Le Roux added a comment - I finally agree Ratnesh, I will simply improve the ProductConditionsThenActions labels and add this information
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Done at at revision 1744903

        Show
        jacques.le.roux Jacques Le Roux added a comment - Done at at revision 1744903

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            jacques.le.roux Jacques Le Roux
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development