[COMPASS-3272] Smart Rule Editor Created: 20/Nov/18  Updated: 29/Oct/23  Resolved: 24/Jan/19

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: 1.18.0

Type: Story Priority: Major - P3
Reporter: Massimiliano Marcon Assignee: Massimiliano Marcon
Resolution: Fixed Votes: 0
Labels: triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to COMPASS-3153 Add jsonSchema to ace-autocompleter Closed
is related to COMPASS-3305 Autocomplete keywords and fields Closed
is related to COMPASS-3307 Check validation rules Closed
is related to COMPASS-3308 Display cancel and save Closed
is related to COMPASS-3309 Cancel validation rules changes Closed
is related to COMPASS-3339 Add jsonSchema support Closed
Epic Link: COMPASS-2198
Sprint: Iteration Takaioko, Iteration Unagi, Iteration Vol au Vent, Iteration Wasabi

 Description   

User Story

As a Compass user
I want some help when writing my validation rules
So that I don’t need to remember the syntax of the validation operators, properties and their allowed values and the name of the fields of existing documents

Acceptance Criteria

  • When I start typing the name of an existing field, an operator, a type or other keywords, the editor should suggest possible values
    • Ideally, suggestions should be contextual, e.g. I should not be suggested a field name when I should be specifying the expected type of a field
  • Autocompletion should work both for query operators as well as for JSON schema (including all the keywords specified here: http://docs.mongodb.com/manual/reference/operator/query/jsonSchema/#op._S_jsonSchema)
  • When I get suggested possible values, I should be able to select one of the suggestions
  • If none of the values that are suggested is the one I want, I should be able to type a different one
    • A good use case for this is when I am creating validation rules for a field that does not exist in the documents already in the collection or when I am inserting rules for an empty collection: in these cases I should be able to type the field name even if it is not autocompleted
  • The editor should support syntax highlighting for validation rules
  • The editor should highlight errors and ideally give the user some hints on what the error is about

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