[COMPASS-274] Converting type names to numbers in doc validation rule builder makes JSON less readable Created: 03/Nov/16 Updated: 14/Nov/18 Resolved: 14/Nov/18 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | UI / UX |
| Affects Version/s: | None |
| Fix Version/s: | 1.18.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Morgan | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Epic Link: | COMPASS-2227 |
| Story Points: | 2 |
| Description |
|
I created doc validation rules using type names (see attached) but Compass then converts them to the numeric equivalent in the JSON output and the rule that's added to MongoDB. It would be simpler for people to understand the rules if Compass kept the name instead.
Scope of the ticket:
|
| Comments |
| Comment by Asya Kamsky [ 24/Sep/17 ] |
|
I take it back - it keeps string if that's what the rule starts out as, when I add a new rule it converts it to number like Andrew observed. Still it doesn't handle $type="number" possibly related to that... |
| Comment by Asya Kamsky [ 24/Sep/17 ] |
|
I noticed in 1.9 beta2 that it seems to have kept the strings. On the other hand, it doesn't seem to know $type "number" so when I had a rule like that, it only displays as JSON and not in rule builder so I can't edit it. Should I file a separate bug or is this part of types etc? |
| Comment by Thomas Rueckstiess [ 10/Mar/17 ] |
|
String aliases for types were converted to numbers for backwards-compatibility with older servers. However, we only use these in the Document Validation context, which was also added in 3.2, together with string aliases. We can therefore safely send the string alias instead of the number. |