Uploaded image for project: 'Atlas Module'
  1. Atlas Module
  2. ATLAS-182

Invalid response when updating marker

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: Atlas Server 3.1
    • Fix Version/s: None
    • Component/s: Atlas server 3.x
    • Labels:
      None
    • Complexity:
      Low

      Description

      When updating my marker using Safari, I noticed the date changed to "invalid date."

      I did not see this when using Chrome. When inspecting the PATCH response, it appears to have invalid entries:

      {
          "id": "00000000-0000-4444-8888-000000000000",
          "latitude": "39.77864",
          "longitude": "-86.17785",
          "name": "Regenstrief Institute",
          "url": "http://www.regenstrief.org/",
          "type": "Research",
          "image": "",
          "patients": 0,
          "encounters": 0,
          "observations": 0,
          "contact": "Burke Mamlin",
          "email": "",
          "notes": "",
          "data": "",
          "atlas_version": "2012-11-11 20:45:05",
          "date_created": "2012-11-12T01:45:05.000Z",
          "date_changed": "2019-07-07 23:01:55",
          "created_by": "burke",
          "show_counts": 1,
          "openmrs_version": "",
          "distribution": null
      }
      

      There are two apparent issues with this response:

      • The atlas_version is a date from 2012. I expected this to be an Atlas module version like "2.1"  or blank (if the marker was created manually without using the atlas module).
      • The date_changed is an ambiguous date without a timezone. Apparently, Chrome will infer the timezone, while Safari considers it an invalid date. All dates should be absolute (i.e., include timezone).

      Downloading the data shows date_changed with a value of "2019-07-07T23:07:18.000Z", which is reassuring – i.e., an absolute timestamp is stored in the database. This means the bug is just in the server's generation of the response and in the UI. On the other hand, atlas_version contains values "2", "2.1", "2.1-SNAPSHOT", "2.2", "2.2-SNAPSHOT", and timestamps without timezone in some rows. Cleaning up atlas_version values might require some manual, one-time SQL on the server along with code changes.

        Attachments

          Activity

            People

            Assignee:
            heliostrike Sai Sandeep Mutyala
            Reporter:
            burke Burke Mamlin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: