Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-274

Date types cannot be updated via REST calls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Neutral
    • None
    • 2.2.2
    • integration
    • None

    Description

      When trying to update a property of type Date via REST I always get the time of the call in the field rather than the passed value.

      I would expect to be able to update a date property like this (similar to this):

      curl http://localhost:8080/magnoliaAuthor/.rest/nodes/v1/website/travel \
      -H "Content-Type: application/json" \
      -X POST -i \
      --user superuser:superuser \
      --data \
      '{
        "properties": [
          {
            "name": "title",
            "type": "String",
            "values": [
              "Hello REST updated"
            ]
          },
          {
            "name": "date",
            "type": "Date",
            "values": [
              "2020-01-01T11:10:00.000+01:00"
            ]
          }  
        ]
      }'
      

      Workaround
      Create a command to update the node and call the command via REST.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              rgange Richard Gange
              rgange Richard Gange
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD