Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1310

Add StartDate Filter button is incorrectly enabled after editing date

    Details

    • Type: Bug Report
    • Status: Done
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0-alpha1, 2.2.0
    • Component/s: frontend
    • Labels:
      None

      Description

      Reproduce:

      • In the Report Edit mode, open the Start Date Filter modal
      • Click in the first date text input field
      • Ignore the popover and type an invalid date there
      • See that the Add Filter button is correctly disabled
      • Click on the second date text input field
      • Ignore the popover and type an invalid date there
      • Continue ignoring the popover and type a valid date there

      Expected:

      • The Add Filter button is still disabled as the first date input field still contains an invalid date

      Observed:

      • The Add Filter button is enabled

        Activity

        Hide
        omran.abazeed Omran Abazeed added a comment -

        Please have a look.
        I think things you mentioned should be fixed now.
        regarding your third point:
        the problem is that if you keep switching between static and dynamic the number of days keep incrementing
        My fix was wrong because I thought we only deal with days when we switch.

        Show
        omran.abazeed Omran Abazeed added a comment - Please have a look. I think things you mentioned should be fixed now. regarding your third point: the problem is that if you keep switching between static and dynamic the number of days keep incrementing My fix was wrong because I thought we only deal with days when we switch.
        Hide
        sebastian.stamm Sebastian Stamm added a comment -
        Show
        sebastian.stamm Sebastian Stamm added a comment - I think it should be possible to use the DatePicker component without specifying initialDates. These two lines look like they do this, but when initialDates is not defined, it will throw an error, because you cannot call format on undefined Tests seem to be broken: https://ci.optimize.camunda.cloud/job/camunda-optimize/job/master/109/testReport/junit/client.DateFields.test/js/Unit_tests___Frontend___should_check_if_a_start_date_or_end_date_is_valid/ I don't understand this change . If I set it to two weeks in relative Date mode and go to static view, it is only one week We could think about exporting the dateformat constant from the DatePicker service instead of defining it again in the DatePicker component
        Hide
        sebastian.stamm Sebastian Stamm added a comment -

        The Add Filter button appears to be always enabled now. Additionally, these new problems occur:

        • After opening the modal and clicking in the startDate input field, when typing anything, the content of the input field does not change. I can delete the last digit, but only one. When removing everything and starting to type a new date, I cannot type the minus sign required by the date format
        • Sometimes, input from the start date input field is applied to the end date input, too. For example, if I paste the string "sdfjgh23" into the start date field, it also appears in the end date field. In contrast, if I past "sdfjg", the end date field is not affected
        • When one date input field is invalid, the datepicker popover does not open anymore
        Show
        sebastian.stamm Sebastian Stamm added a comment - The Add Filter button appears to be always enabled now. Additionally, these new problems occur: After opening the modal and clicking in the startDate input field, when typing anything, the content of the input field does not change. I can delete the last digit, but only one. When removing everything and starting to type a new date, I cannot type the minus sign required by the date format Sometimes, input from the start date input field is applied to the end date input, too. For example, if I paste the string "sdfjgh23" into the start date field, it also appears in the end date field. In contrast, if I past "sdfjg", the end date field is not affected When one date input field is invalid, the datepicker popover does not open anymore

          People

          • Assignee:
            Unassigned
            Reporter:
            sebastian.stamm Sebastian Stamm
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: