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

Edit Estimated Ship Date or Estimated Delivery Date brings on date format error

    XMLWordPrintableJSON

Details

    Description

      On demo site, enter the URL

      https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=DEMO10091

      In Action screenlet, choose Edit Items
      In Estimated Delivery Date, use calendar and choose a date. The date presented will be formatted according to your locale.
      Click on Update Items. An error message is displayed to say the date is not in the correct format.

      With the changes for localized dates, there are two input elements, one hidden one for a plain date suitable for conversion to a Timestamp, and the other displayed to the user in localized format. The second input element should not be processed by the updateApprovedOrderItems service.

      updateApprovedOrderItems uses string-map-prefixes of isdm_ and iddm_ for estimated ship and delivery dates respectively. So the maps processed by the service contain both plain and localized dates.

      The patch adds an if statement to ignore members of the isdm and iddm maps with keys that have a suffix of _i18n.

      I have grepped all of the Ofbiz code for any other service that uses dates with string-map-prefix, and updateApprovedOrderItems is the only one, so I believe the problem won't occur anywhere else.

      Attachments

        Issue Links

          Activity

            People

              sascha Sascha Schumann
              paulfoxworthy Paul Foxworthy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified