<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:46:03 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[COMPASS-7285] Problem in validation under the collection</title>
                <link>https://jira.mongodb.org/browse/COMPASS-7285</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;h3&gt;&lt;a name=&quot;ProblemStatement%2FRationale&quot;&gt;&lt;/a&gt;&lt;b&gt;Problem Statement/Rationale&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;In MongoDB Compass, I am encountering an issue with validation in a particular collection. When I define a validation rule, save it, and then update the collection, it consistently shows &quot;Failed validation,&quot; even when the data matches the validation rule.&#160;&lt;br/&gt;
Example:&lt;br/&gt;
This is my original data under the collection&lt;br/&gt;
{&lt;br/&gt;
&#160; &quot;_id&quot;: {
&#160; &#160; &quot;$oid&quot;: &quot;6513d54145b4ff5f40df58e3&quot;
&#160; },&lt;br/&gt;
&#160; &quot;name&quot;: &quot;Mug&quot;&lt;br/&gt;
}&lt;br/&gt;
I am validating as per this&#160;&lt;br/&gt;
{&lt;br/&gt;
&#160; name: {
&#160; &#160; type: &apos;string&apos;
&#160; }&lt;br/&gt;
}&lt;br/&gt;
As the name is string but it shows me every validation under the Failed Validation.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Please be sure to attach relevant logs &lt;em&gt;with any sensitive data redacted&lt;/em&gt;.&lt;/b&gt;&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2023-10-01T16:59:59.792+05:30&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:51800, &quot;ctx&quot;:&quot;conn5&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:59272&quot;,&quot;client&quot;:&quot;conn5&quot;,&quot;doc&quot;:{&quot;application&quot;:&lt;/p&gt;
{&quot;name&quot;:&quot;MongoDB Compass&quot;}
&lt;p&gt;,&quot;driver&quot;:{&quot;name&quot;:&quot;nodejs&quot;,&quot;version&quot;:&quot;6.0.0&quot;},&quot;platform&quot;:&quot;Node.js v18.16.1, LE&quot;,&quot;os&quot;:{&quot;name&quot;:&quot;win32&quot;,&quot;architecture&quot;:&quot;x64&quot;,&quot;version&quot;:&quot;10.0.22621&quot;,&quot;type&quot;:&quot;Windows_NT&quot;}}}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2023-10-01T16:59:59.797+05:30&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:6788700, &quot;ctx&quot;:&quot;conn5&quot;,&quot;msg&quot;:&quot;Received first command on ingress connection since session start or auth handshake&quot;,&quot;attr&quot;:{&quot;elapsedMillis&quot;:5}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2023-10-01T16:59:59.798+05:30&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;COMMAND&quot;, &quot;id&quot;:5324200, &quot;ctx&quot;:&quot;conn5&quot;,&quot;msg&quot;:&quot;CMD: collMod&quot;,&quot;attr&quot;:{&quot;cmdObj&quot;:{&quot;collMod&quot;:&quot;products&quot;,&quot;validator&quot;:{&quot;name&quot;:{&quot;type&quot;:&quot;string&quot;}},&quot;validationLevel&quot;:&quot;strict&quot;,&quot;validationAction&quot;:&quot;error&quot;}}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2023-10-01T16:59:59.800+05:30&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;REPL&quot;, &quot;id&quot;:7360104, &quot;ctx&quot;:&quot;conn5&quot;,&quot;msg&quot;:&quot;Wrote oplog entry for collMod&quot;,&quot;attr&quot;:{&quot;namespace&quot;:&quot;aggregation_test.$cmd&quot;,&quot;uuid&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;e338876b-45e2-4e59-b53f-9c7bbbe1dcff&quot;}},&quot;opTime&quot;:{&quot;ts&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}},&quot;t&quot;:-1},&quot;object&quot;:{&quot;collMod&quot;:&quot;products&quot;,&quot;validator&quot;:{&quot;name&quot;:{&quot;type&quot;:&quot;string&quot;}},&quot;validationLevel&quot;:&quot;strict&quot;,&quot;validationAction&quot;:&quot;error&quot;}}}&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;StepstoReproduce&quot;&gt;&lt;/a&gt;&lt;b&gt;Steps to Reproduce&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;How could an engineer replicate the issue you&#8217;re reporting?&lt;/font&gt;To reproduce the issue:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Open MongoDB Compass.&lt;/li&gt;
	&lt;li&gt;Select a collection.&lt;/li&gt;
	&lt;li&gt;Define a validation rule, such as:&lt;br/&gt;
{&lt;br/&gt;
&#160; &quot;name&quot;: 
{
&#160; &#160; &quot;type&quot;: &quot;string&quot;
&#160; }
&lt;p&gt;}&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Save the validation rule.&lt;/li&gt;
	&lt;li&gt;Update the collection.&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;&lt;a name=&quot;ExpectedResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Expected Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What do you expect to happen?&lt;br/&gt;
- I expect the validation to pass as the &quot;name&quot; field is a string, and it should match the defined validation rule.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ActualResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Actual Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;What do you observe is happening?&lt;br/&gt;
- Currently, the validation shows &quot;Failed validation&quot; even when the data complies with the validation rule.&lt;/font&gt;&lt;/p&gt;</description>
                <environment>OS: Windows 11&lt;br/&gt;
Python / Python Versions: Python 3.11.5</environment>
        <key id="2455539">COMPASS-7285</key>
            <summary>Problem in validation under the collection</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="punitmann9599@gmail.com">Punit Mann</reporter>
                        <labels>
                    </labels>
                <created>Sun, 1 Oct 2023 11:40:37 +0000</created>
                <updated>Fri, 27 Oct 2023 13:07:33 +0000</updated>
                            <resolved>Tue, 3 Oct 2023 17:55:30 +0000</resolved>
                                                    <fixVersion>No version</fixVersion>
                                        <due></due>
                            <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5749526" author="rhys.howell" created="Tue, 3 Oct 2023 17:55:30 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=punitmann9599%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;punitmann9599@gmail.com&quot;&gt;punitmann9599@gmail.com&lt;/a&gt;&#160;&lt;br/&gt;
You&apos;ll have to specify a schema object in a format like the following to use Compass&apos; schema validation:&lt;br/&gt;
{&lt;br/&gt;
&#160; $jsonSchema: {&lt;br/&gt;
&#160; &#160; bsonType: &apos;object&apos;,&lt;br/&gt;
&#160; &#160; required: [&lt;br/&gt;
&#160; &#160; &#160; &apos;name&apos;&lt;br/&gt;
&#160; &#160; ],&lt;br/&gt;
&#160; &#160; properties: {&lt;br/&gt;
&#160; &#160; &#160; name: &lt;/p&gt;
{
&#160; &#160; &#160; &#160; bsonType: &apos;string&apos;,
&#160; &#160; &#160; &#160; description: &apos;name must be a string&apos;
&#160; &#160; &#160; }
&lt;p&gt;&#160; &#160; }&lt;br/&gt;
&#160; }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Here&apos;s some more documentation:&lt;br/&gt;
&lt;a href=&quot;https://www.mongodb.com/docs/manual/core/schema-validation/specify-validation-level/#steps--use-strict-validation&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/core/schema-validation/specify-validation-level/#steps--use-strict-validation&lt;/a&gt;&#160;&lt;/p&gt;

&lt;p&gt;I do understand how it&apos;s not quite intuitive - we aren&apos;t giving many clues as to what the format should be in this validation tab. It&apos;s something we&apos;ll have to look into improving the user experience of down the line. cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=julia.oppenheim%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;julia.oppenheim@mongodb.com&quot;&gt;julia.oppenheim@mongodb.com&lt;/a&gt; &#160;&lt;/p&gt;</comment>
                            <comment id="5747900" author="JIRAUSER1275315" created="Tue, 3 Oct 2023 10:57:28 +0000"  >&lt;p&gt;I am using arch , and I am having the same issue . I opens and like after 10 secs , a white screen is displayed and it stops working.&lt;/p&gt;</comment>
                            <comment id="5743917" author="dbeng-pm-bot" created="Sun, 1 Oct 2023 11:40:40 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=punitmann9599%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;punitmann9599@gmail.com&quot;&gt;punitmann9599@gmail.com&lt;/a&gt;, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible. &lt;/p&gt;

&lt;p&gt;Please review your issue to ensure you&apos;ve included your environment details and have attached relevant logs (with any sensitive data redacted), so that we&apos;re best able to provide you a timely and thorough response. Thanks again!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="479782" name="Screenshot (9).png" size="153233" author="punitmann9599@gmail.com" created="Sun, 1 Oct 2023 11:40:31 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 1 Oct 2023 11:40:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        18 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            18 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dbeng-pm-bot</customfieldvalue>
            <customfieldvalue>professormoriarity2000@gmail.com</customfieldvalue>
            <customfieldvalue>punitmann9599@gmail.com</customfieldvalue>
            <customfieldvalue>rhys.howell@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2sttb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2ar6k:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2sfyn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>