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

As a form creator, I want to define past and range 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 in forms,
      then I must be able to add a past and range validation using the response date as parameter

      2 - 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-134213 Technical Task Closed Victor Santos  
          2.
          [PM] Acceptance Criteria LPS-134214 Technical Task Closed Luiz Jardim  
          3.
          [FE] Add to field Accepted Dates the following values: Past Dates and Range LPS-134225 Technical Task Closed Aline Cantarelli  
          4.
          [FE] Create field Ends on with the single option Response Date LPS-134226 Technical Task Closed Aline Cantarelli  
          5.
          [FE] Create Sidebar section named Start Date which will only be displayed when Range is selected on field Accepted Dates LPS-134227 Technical Task Closed Aline Cantarelli  
          6.
          [FE] Create Sidebar section named End Date which will only be displayed when Range is selected on field Accepted Dates LPS-134228 Technical Task Closed Aline Cantarelli  
          7.
          [FE] Display dynamically the fields Starts From and Ends on according to the values selected on field Accepted Dates LPS-134229 Technical Task Closed Aline Cantarelli  
          8.
          [FE] Create tests LPS-134230 Technical Task Closed Aline Cantarelli  
          9.
          [BE] Define JSON attributes for past dates and range to be validated (Response Date) LPS-134231 Technical Task Closed Carolina Barbosa  
          10.
          [BE] Create new Function to validate Past Dates LPS-134233 Technical Task Closed Carolina Barbosa  
          11.
          [BE] Create new Validation to validate Past Dates LPS-134234 Technical Task Closed Carolina Barbosa  
          12.
          [BE] Create new Function to validate range between Start Date and End Date LPS-134235 Technical Task Closed Carolina Barbosa  
          13.
          [BE] Create new Validation to validate range between Start Date and End Date LPS-134236 Technical Task Closed Carolina Barbosa  
          14.
          [BE] Visit DDMFormEvaluatorHelper to make sure that the Date Validation is working as expected LPS-134237 Technical Task Closed Carolina Barbosa  
          15.
          [BE] Create tests (unit or integration) LPS-134238 Technical Task Closed Carolina Barbosa  
          16.
          [QA] Review ACs and Draft TCs LPS-134321 Technical Testing Closed Gleice Lisbino  
          17.
          [BE] Add feature flag LPS-135392 Technical Task Closed Carolina Barbosa  
          18.
          [QA] Manual Validation - Round 01 - Passed LPS-136311 Technical Testing Closed Support QA  
          19.
          [PM] Review LPS-136528 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.3.4 CE GA4
                  7.4.13 DXP GA1
                  7.4.X
                  Master