Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21957

disable the ability to set an incorrect date

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.2
    • Fix Version/s: None
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      alfresco 5.2.f, share 5.2.e
    • Resolution Time Custom Field:
      4 weeks, 6 days, 16 hours, 7 minutes, 39 seconds

      Description

      There is a date property in a type described as:

      <namespaces>
              <namespace uri="http://www.ecm-consulting.ru/model/nddoc/1.0" prefix="ecmcnddoc"/>
      </namespaces>

      <property name="ecmcnddoc:test_date">
          <title>Document test date</title>
          <type>d:date</type>
      </property>

      In alfresco spring @Component the property value is set to a noreRef, for example:

      String testDateString = "0213-02-18T00:00:00-00:00";

      final Calendar calendar = javax.xml.bind.DatatypeConverter.parseDateTime(testDateString);
      Date testDate = calendar.getTime();

      nodeService.setProperty(nodeRef, getQName("ecmcnddoc:test_date"), testDate );

       

      It works fine and set the date to noderef.

      The problem is that the noderef data is incorrectly or failed indexing in solr4 and could not be found by search. The reason is the incorrect date 18.02.0213.

      Please validate the incorrect date property values to prevent solr4 indexing problems

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                alexander.zverev@ecm-consulting.ru Alexander
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: