[SERVER-76705] Fields are reordered alphabetically by key when editing an existing document Created: 01/May/23  Updated: 02/Jun/23  Resolved: 04/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Michelle Fisher Assignee: Backlog - Triage Team
Resolution: Duplicate Votes: 0
Labels: Bug
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Windows 10
node.js / npm versions: latest stable
Additional info:


Attachments: PNG File image-2023-04-30-19-19-23-858.png     PNG File image-2023-04-30-19-21-05-868.png     PNG File image-2023-04-30-19-22-25-976.png    
Issue Links:
Related
is related to SERVER-2592 The fields in a document are reordere... Closed
is related to SERVER-74408 Insert document exactly as specified ... Closed
Assigned Teams:
Server Triage
Operating System: ALL
Participants:

 Description   

Problem Statement/Rationale

When updating an existing document in Atlas, the fields are reordered in alphabetical order by key, rather than maintaining the order they were entered in upon applying the update.

Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell

Steps to Reproduce

  1. Insert a new document in a collection in Atlas containing only the auto-generated ObjectID field/value pair
  2. Edit the document you just created, adding one field with a key that starts with "Z" and a second field with a key that starts with "A"
  3. Click Update. 

Expected Results

The fields should retain the order from the update interface. The Z field should come first, and the A field should come second.

Actual Results

The keys and values are both saved, but they're reordered so the A key is first, and the Z key is second

Additional Notes

This appears to be related/similar to SERVER-2592. I've also seen the same behavior in Compass, but I don't have screenshots from Compass currently. I'm using a M0 Sandbox (General) tier cluster.



 Comments   
Comment by Yuan Fang [ 04/May/23 ]

Hi mdfisher4@wisc.edu,

Thank you for your report. A similar issue has already been reported in SERVER-74408. The corresponding team is currently investigating the problem and will provide updates as they become available. Please stay tuned to SERVER-74408 for any future updates. I will close this as a duplicate of SERVER-74408.

Regards,
Yuan

Generated at Thu Feb 08 06:33:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.