Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-2758

As a Compass user I need the "copy document" operation to preserve datatypes when using drag/drop to load documents into a different collection

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 1.12.6
    • None
    • Compass, Import/Export
    • None
    • Iteration Bison

    Description

      When using the copy document button on the Documents tab, the JSON copied to the clipboard is not sufficient to preserve data types such as date, binary, code, decimal128, int64, maxkey, minkey, objectId, bsonRegex, symbol and timestamp.

      The attached screenshot shows the insert document dialog when attempting to drag/drop a JSON document with these types into a collection. Most of the types are converted to strings, however, a few are incorrectly categorized as objects (including code, decimal128, maxkey, minkey).

      This is the original document containing fields with various values.

      The copy document button generates a JSON document on one line. Here is the example spread out for clarity.

      {
      "_id":"5ad749af86c98d53d48d55ab",
      "stringType":"test copy document types",
      "arrayType":["cell one","cell two","cell three"],
      "binaryType":"W29iamVjdCBPYmplY3Rd",
      "booleanType":false,
      "codeType":{"scope":{},"code":"[object Object]"},
      "dateType":"2018-02-11T09:45:54.000Z",
      "decimal128Type":{"$numberDecimal":"986521.44"},
      "doubleType":"3.14159",
      "int32Type":1024,
      "int64Type":"2048",
      "maxkeyType":{"_bsontype":"MaxKey"},
      "minkeyType":{"_bsontype":"MinKey"},
      "nullType":null,
      "objectType":{"subDocField":"stuff"},
      "objectIdType":"5ad74b6d86c98d53d48d55ac",
      "bsonRegexExpType":{"_bsontype":"BSONRegExp","pattern":"[abc].*[xyz]","options":""},
      "symbolType":"alpha-particle",
      "timestampType":"0"
      }
      

      This is the document insertion dialog showing many field types incorrectly detected during drag/drop of the JSON file.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brian.blevins@mongodb.com Brian Blevins
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: