Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-2282

Cannot leave empty date range aggregates fields "from" or "to"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 21
    • Component/s: Content Views

      Description

      Studio generates the following configuration:

                <aggregate id="dublincore_modified_agg" type="date_range" parameter="dc:modified">
                  <field schema="localisation_cv" name="dublincore_modified_agg"/>
                  <properties/>
                  <dateRanges>
                    <dateRange key="from_now-6M_to_now" fromDate="now-6M" toDate="now"/>
                    <dateRange key="from__to_now-6M" fromDate="" toDate="now-6M"/>
                  </dateRanges>
                </aggregate>
      

      While the default_search contrib looks like this

       <aggregate id="dc_modified_agg" type="date_range" parameter="dc:modified">
                  <field schema="default_search" name="dc_modified_agg" />
                  <properties>
                    <property name="format">"dd-MM-yyyy"</property>
                  </properties>
                  <dateRanges>
                    <dateRange key="last24h" fromDate="now-24H" toDate="now"/>
                    <dateRange key="lastWeek" fromDate="now-7d" toDate="now-24H"/>
                    <dateRange key="lastMonth" fromDate="now-1M" toDate="now-7d"/>
                    <dateRange key="lastYear" fromDate="now-1y" toDate="now-1M"/>
                    <dateRange key="priorToLastYear" toDate="now-1y"/>
                  </dateRanges>
                </aggregate>
      

      In the default contrib, the prior to last year range does not have the "fromDate" attribute. Studio generates a config where the attribute is present but empty. This breaks the search tab.

        Attachments

        1. server.log
          312 kB
          Michaël Vachette

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: