[COMPASS-4602] Validation doesn't act correctly if create document with invalid id value Created: 02/Feb/21  Updated: 02/Dec/22

Status: Open
Project: Compass
Component/s: Document Validation, Documents
Affects Version/s: 1.25.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Olena Protsiuk (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac, Windows


Attachments: PNG File MongoDB Compass - My Cluster 123 2021-02-02 15-15-29.png    
Story Points: 2

 Description   

Problem Description

Steps to Reproduce

1. Click to Insert New document to the collection
2. Switch to list view and go back to the {} JSON view
--> _id value is autogenerated
3. Update $oid" value to incorrect, for e.g. to:

  • "" (empty)
  • " " (space)
  • "1236"
  • too short
  • too long
  • etc.

4. Click Insert button

Expected Results

Validation acts, "Insert not permitted while document contains errors." error message appears, Insert button is disabled  

Actual Results

"Inserting Document" message appears and is constantly displayed, form is not closing, data is not inserted, it's not possible to switch to list view.

Additional Notes

If in list view add new field of int type, enter correct number, switch to json view and update its value to incorrect (add letters for e.g.) then it works as expected:  "Insert not permitted while document contains errors." error message appears.

 


Generated at Wed Feb 07 22:36:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.