Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-129396

As a form creator, I want to define future validations to my date field type with response date as parameter

    Details

      Description

      Design Deliverable

      Mockups

      Context:

      For our customers, in many use cases dates need to have validations, so the user can't input a value that is invalid, we have this kind of validation for numeric and text fields already through the UI.

      Some use cases that we need to cover for date pick validation are:

      • When an agent or customer/prospect is trying to buy an insurance policy online using Liferay Forms, they need to pick an effective date for their policy.  This policy effective date has to be greater than the current date but cannot exceed past 30 days of current date (some insurance policies have different rules about the 30 days - can be 60 days, for example).  Insurance companies have an eligibility date range because that policy effective date helps determine what rates to apply to the quote. 
      • Having the date range also helps ensure that the person buying the policy is not fraudulent - For example, if I get into a car accident today and don't have insurance, I will try to buy insurance online with a policy effective date of yesterday so that I can file a claim with my insurance company to avoid paying for the accident out-of-pocket. Insurance companies avoid fraud like this by having rules that state their policy cannot be effective until at least the next day of purchase.

      Acceptance Criteria

      1 - Given an admin user,
      when adding a date field,
      then I must be able to add validations for it

      2 - Given an admin user,
      when adding a date field in forms,
      then I must be able to add a future validation using the response date as parameter

      3 - Given a user,
      when filling a form with date fields with validation,
      then I must only be able to submit a form/change page of the form with dates that pass the validations

      Definition of Done (DoD):

      • All Acceptance Criteria were passed;
      • Make sure that the expected automated tests were created (unit / integration / functional) and passed successfully;
      • Code with peer review completed;
      • Validated by QA, Product Designer and/or PM;
      • No critical bug related to Story scope (ex.: similar of FP4, FP5);
      • Make sure that all system documentation were updated (if necessary)
      • Make sure that it has the extensions points needed to allow GS and customers to customize the feature (If applicable)

        Attachments

          Issue Links

          1.
          [DS] Mockups LPS-131324 Technical Task Closed Victor Santos  
          2.
          [PM] Acceptance Criteria LPS-131538 Technical Task Closed Luiz Jardim  
          3.
          [FE] Adjust Validation React Component to support the Date Validation LPS-134215 Technical Task Closed Adriano Interaminense  
          4.
          [FE] Create field Accepted Dates with the following value: Future Dates LPS-134216 Technical Task Closed Adriano Interaminense  
          5.
          [FE] Create field Starts From with the single option Response Date LPS-134217 Technical Task Closed Adriano Interaminense  
          6.
          [FE] Create tests LPS-134218 Technical Task Closed Adriano Interaminense  
          7.
          [BE] Define JSON attributes for futures dates to be validated (Response Date) LPS-134219 Technical Task Closed Carolina Barbosa  
          8.
          [BE] Create new Function to validate Future Dates LPS-134220 Technical Task Closed Carolina Barbosa  
          9.
          [BE] Create new DDMValidation and DDMExpressionFunction to validate Future Dates LPS-134222 Technical Task Closed Carolina Barbosa  
          10.
          [BE] Visit DDMFormEvaluatorHelper to make sure that the Date Validation is working as expected LPS-134223 Technical Task Closed Bruno Oliveira (Inactive)  
          11.
          [BE] Create tests (unit or integration) LPS-134224 Technical Task Closed Carolina Barbosa  
          12.
          [QA] Review ACs and Draft TCs LPS-134319 Technical Testing Closed Gleice Lisbino  
          13.
          [BE] Show Validation property for date field LPS-135057 Technical Task Closed Carolina Barbosa  
          14.
          [BE] Remove quotes from Parameter field for date field validation LPS-135058 Technical Task Closed Carolina Barbosa  
          15.
          [QA] Manual Validation - Round 01 - Failed LPS-135475 Technical Testing Closed Support QA  
          16.
          Date validation property is not using the timezone as reference LPS-135723 Impedibug Closed Carolina Barbosa  
          17.
          [QA] Manual Validation - Round 02 - Failed LPS-136028 Technical Testing Closed Support QA  
          18.
          Date validation is not working when form is in Arabic language LPS-136237 Impedibug Closed Carolina Barbosa  
          19.
          [QA] Manual Validation - Round 03 - Passed LPS-136303 Technical Testing Closed Support QA  
          20.
          [PM] Review LPS-136315 Technical Task Closed Luiz Jardim  

            Activity

              People

              Assignee:
              luiz.jardim Luiz Jardim
              Reporter:
              luiz.jardim Luiz Jardim
              Engineering Assignee:
              Luiz Jardim
              Recent user:
              Sophia Zhang
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.4.2 CE GA3 DXP 7,4
                  7.4.13 DXP GA1
                  Master