OFBiz
  1. OFBiz
  2. OFBIZ-4319

Display dateTime field with input method time-dropdown not use context value to display hour and minutes

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      If you define a dateTime field that like :

      <field name="estimatedStartDate"><date-time input-method="time-dropdown" step="10"/></field>

      and pass in context : estimatedStartDate = "2011-06-016 20:30:00"

      when you edit the form, estimatedStartDate take the good value 2011-06-016 on date, but take nowTimestamps.hour for dropdown hour instead of 20 and nowTimestamps.minutes for dropdown minutes instead of 30

      To test the patch :

      • Apply patch (of course )
      • build with ant
      • go to ofbiz example component with given date that like : "https://localhost:8443/example/control/FormWidgetExamples?field4=2001-01-01 02:21:000"
      • the field 4 must have hour to 02 and minutes to 21

      I create 2 screenshots : before and after correction.

      Nicolas

      1. DateTime-time-dropdown-with-path.png
        45 kB
        Nicolas Malin
      2. DateTime-time-dropdown-without-path.png
        45 kB
        Nicolas Malin
      3. OFBIZ-4319.patch
        5 kB
        Nicolas Malin
      4. OFBIZ-4319.patch
        5 kB
        Nicolas Malin

        Activity

        Nicolas Malin created issue -
        Hide
        Nicolas Malin added a comment -

        In patch :

        • I also correct multiple definition : sr.append("\" value=\"");
        • remove unneeded escape at end line :
          if (UtilValidate.isEmpty(requiredStyle)) requiredStyle = "required";
        Show
        Nicolas Malin added a comment - In patch : I also correct multiple definition : sr.append("\" value=\""); remove unneeded escape at end line : if (UtilValidate.isEmpty(requiredStyle)) requiredStyle = "required";
        Nicolas Malin made changes -
        Field Original Value New Value
        Attachment DateTime-time-dropdown-with-path.png [ 12482844 ]
        Attachment DateTime-time-dropdown-without-path.png [ 12482845 ]
        Attachment OFBIZ-4319.patch [ 12482846 ]
        Hide
        Nicolas Malin added a comment -

        Previous upload contains with line contextValue = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));

        Show
        Nicolas Malin added a comment - Previous upload contains with line contextValue = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
        Nicolas Malin made changes -
        Attachment OFBIZ-4319.patch [ 12482871 ]
        Scott Gray made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Nicolas Malin made changes -
        Description If you define a dateTime field that like :

         <field name="estimatedStartDate"><date-time input-method="time-dropdown" step="10"/></field>

        and pass in context : estimatedStartDate = "2011-06-016 20:30:00"

        when you edit the form, estimatedStartDate take the good value 2011-06-016 on date, but take nowTimestamps.hour for dropdown hour instead of 20 and nowTimestamps.minutes for dropdown minutes instead of 30

        I test patch :
         * Apply patch (of course ;) )
         * build with ant
         * go to ofbiz example component with given date that like : "https://localhost:8443/example/control/FormWidgetExamples?field4=2001-01-01 02:21:000"
         * the field 4 must have hour to 02 and minutes to 21

        I create 2 screeshot before and after correction.

        Nicolas
        If you define a dateTime field that like :

         <field name="estimatedStartDate"><date-time input-method="time-dropdown" step="10"/></field>

        and pass in context : estimatedStartDate = "2011-06-016 20:30:00"

        when you edit the form, estimatedStartDate take the good value 2011-06-016 on date, but take nowTimestamps.hour for dropdown hour instead of 20 and nowTimestamps.minutes for dropdown minutes instead of 30

        To test the patch :
         * Apply patch (of course ;) )
         * build with ant
         * go to ofbiz example component with given date that like : "https://localhost:8443/example/control/FormWidgetExamples?field4=2001-01-01 02:21:000"
         * the field 4 must have hour to 02 and minutes to 21

        I create 2 screenshots : before and after correction.

        Nicolas
        Hide
        Jacques Le Roux added a comment -

        Thanks Nicolas,

        For your easy to use demonstration

        Your patch is in
        trunk at r1139385
        R11.04 at r1139388

        Show
        Jacques Le Roux added a comment - Thanks Nicolas, For your easy to use demonstration Your patch is in trunk at r1139385 R11.04 at r1139388
        Jacques Le Roux made changes -
        Status Patch Available [ 10002 ] Closed [ 6 ]
        Assignee Jacques Le Roux [ jacques.le.roux ]
        Fix Version/s Release Branch 11.04 [ 12316420 ]
        Resolution Fixed [ 1 ]
        Hide
        Jacques Le Roux added a comment - - edited

        == TYPO ==
        Adrian has complained about this see his comments

        Show
        Jacques Le Roux added a comment - - edited == TYPO == Adrian has complained about this see his comments
        Jacques Le Roux made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Jacques Le Roux added a comment -

        R12.04 is also concerned now...

        Show
        Jacques Le Roux added a comment - R12.04 is also concerned now...
        Jacques Le Roux made changes -
        Fix Version/s Release Branch 12.04 [ 12321265 ]
        Jacopo Cappellato made changes -
        Fix Version/s Trunk [ 12311928 ]
        Fix Version/s Release Branch 11.04 [ 12316420 ]
        Fix Version/s Release Branch 12.04 [ 12321265 ]
        Sharan Foga made changes -
        Sprint Bug Crush Event - 21/2/2015 [ 91 ]
        Sharan Foga made changes -
        Rank Ranked higher
        Sharan Foga made changes -
        Rank Ranked higher
        Sharan Foga made changes -
        Rank Ranked higher

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Nicolas Malin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development

                  Agile