<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:46:10 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-7320] Document Count UI Not Updating When Inserting Document from NodeJS</title>
                <link>https://jira.mongodb.org/browse/COMPASS-7320</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;What is going wrong? What action would you like the Engineering team to take?&lt;br/&gt;
&lt;b&gt;From a Node.js application, when using the insertOne() function to add a new document to a collection, the number of documents displayed in Compass when the collection is selected and refreshed remains the same as it was before the new document is inserted. (refreshing documents populates the new record and increases the count next to the refresh button, but not update the number displayed in the upper right side.)&lt;/b&gt;&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;br/&gt;
&lt;em&gt;How to retrieve logs for: &lt;a href=&quot;https://www.mongodb.com/docs/compass/current/troubleshooting/logs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Compass&lt;/a&gt;; &lt;a href=&quot;https://www.mongodb.com/docs/mongodb-shell/logs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Shell&lt;/a&gt;&lt;/em&gt;&lt;br/&gt;
&lt;b&gt;User is unsure about what data, if any, should be redacted from log.&lt;/b&gt;&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;&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;&lt;b&gt;1. Open a collection in Compass GUI and remain on the Documents tab for the collection (note the number of documents)&lt;/b&gt;&lt;br/&gt;
&lt;b&gt;2. Insert a new record/document from a Node.js application using the insertOne() method on the collection.&lt;/b&gt;&#160;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;&lt;b&gt;3. Click &apos;Refresh documents&apos; in the Compass GUI&lt;/b&gt;&lt;/font&gt;&lt;/p&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;b&gt;1. The newly inserted document appears along with any previously existing documents.&lt;/b&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2. The count of documents increases where it is displayed next to the &apos;Refresh documents&apos;.&lt;/b&gt;&lt;br/&gt;
&lt;b&gt;3. The count of documents to the right-hand side of the collection name increases.&lt;/b&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;b&gt;1. The newly inserted document appears along with any previously existing documents.&lt;/b&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2. The count of documents increases where it is displayed next to the &apos;Refresh documents&apos;.&lt;/b&gt;&lt;br/&gt;
&lt;font color=&quot;#de350b&quot;&gt;&lt;b&gt;3. The count of documents to the right-hand side of the collection name DOES NOT increase.&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AdditionalNotes&quot;&gt;&lt;/a&gt;&lt;b&gt;Additional Notes&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;b&gt;&lt;font color=&quot;#505f79&quot;&gt;This is my first Jira ticket outside of school, but I hope it is helpful. This was also my very first time using the Compass GUI (and the second time using MongoDB). My instructor recommended reporting the issue, in case this was not the intended behaviour.&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;</description>
                <environment>OS: Windows 10 Home&lt;br/&gt;
node.js / npm versions:  &lt;br/&gt;
Node Version - Node.js v18.16.0 &amp;amp;&amp;amp;  &lt;br/&gt;
NPM Version -  mongodb: &amp;quot;^6.1.0&amp;quot;&lt;br/&gt;
Additional info: This issue occurred on various devices (other students in my class had this occur on their machines as well, all Windows 10 or Windows 11, same Node and npm versions)&lt;br/&gt;
</environment>
        <key id="2470976">COMPASS-7320</key>
            <summary>Document Count UI Not Updating When Inserting Document from NodeJS</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="sacha@davidson.solutions">Sacha Davidson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Oct 2023 18:25:24 +0000</created>
                <updated>Fri, 27 Oct 2023 13:07:33 +0000</updated>
                            <resolved>Wed, 11 Oct 2023 11:30:48 +0000</resolved>
                                    <version>1.40.2</version>
                                    <fixVersion>No version</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5770005" author="JIRAUSER1261456" created="Wed, 11 Oct 2023 11:30:30 +0000"  >&lt;p&gt;Hi Sacha&lt;/p&gt;

&lt;p&gt;This is unfortunately &quot;by design&quot;. The number top-right comes from collection metadata (see &lt;a href=&quot;https://github.com/mongodb-js/compass/blob/af2e74e30317d540de266db5ca5f43194ef60d21/packages/data-service/src/data-service.ts#L958&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/blob/af2e74e30317d540de266db5ca5f43194ef60d21/packages/data-service/src/data-service.ts#L958&lt;/a&gt;), ie. the same as if you do db.collection.estimatedDocumentCount() and this can be out of sync. To get an accurate document count you can use db.collection.countDocuments(), however that might do a collection scan which can be slow in some situations which is why compass doesn&apos;t use that there.&lt;/p&gt;</comment>
                            <comment id="5768573" author="dbeng-pm-bot" created="Tue, 10 Oct 2023 18:25:28 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sacha%40davidson.solutions&quot; class=&quot;user-hover&quot; rel=&quot;sacha@davidson.solutions&quot;&gt;sacha@davidson.solutions&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="481992" name="Insert1NodeJsCompassDocumentAfterDropDB.PNG" size="174393" author="sacha@davidson.solutions" created="Tue, 10 Oct 2023 18:24:05 +0000"/>
                            <attachment id="481991" name="Insert1NodeJsCompassDocumentAfterDropDBPt2.PNG" size="174394" author="sacha@davidson.solutions" created="Tue, 10 Oct 2023 18:24:05 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 10 Oct 2023 18:25:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        17 weeks 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>
                            17 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>leroux.bodenstein@mongodb.com</customfieldvalue>
            <customfieldvalue>dbeng-pm-bot</customfieldvalue>
            <customfieldvalue>sacha@davidson.solutions</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2vh47:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2ddd0:</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|i2v39j:</customfieldvalue>

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