<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:05:58 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>[SERVER-4432] Strange item in mongo shell&apos;s autocomplete</title>
                <link>https://jira.mongodb.org/browse/SERVER-4432</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Run the mongo shell, type &quot;cf&quot; and hit tab.  You get an auto-completion suggestion of &quot;cf_&lt;em&gt;1&lt;/em&gt;_f_x) &lt;/p&gt;
{shellAutocomplete(x)}(&quot;.&lt;br/&gt;
&lt;br/&gt;
MongoDB shell version: 2.1.0-pre-&lt;br/&gt;
connecting to: test&lt;br/&gt;
&amp;gt; cf&amp;lt;hit tab here&amp;gt;_&lt;em&gt;1&lt;/em&gt;_f_x) {shellAutocomplete(x)}
&lt;p&gt;(&lt;/p&gt;

&lt;p&gt;Presumably, some leftover cruft from the shellAutocomplete() code, but I haven&apos;t looked into it yet.  Tested on Windows and Ubuntu.&lt;/p&gt;</description>
                <environment></environment>
        <key id="26042">SERVER-4432</key>
            <summary>Strange item in mongo shell&apos;s autocomplete</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="9">Done</resolution>
                                        <assignee username="tad">Tad Marshall</assignee>
                                    <reporter username="tad">Tad Marshall</reporter>
                        <labels>
                    </labels>
                <created>Mon, 5 Dec 2011 22:06:18 +0000</created>
                <updated>Mon, 11 Jul 2016 18:35:34 +0000</updated>
                            <resolved>Tue, 13 Dec 2011 11:23:53 +0000</resolved>
                                                    <fixVersion>2.1.0</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="72754" author="auto" created="Tue, 13 Dec 2011 15:43:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;&apos;, u&apos;name&apos;: u&apos;Tad Marshall&apos;, u&apos;email&apos;: u&apos;tad@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4432&quot; title=&quot;Strange item in mongo shell&amp;#39;s autocomplete&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4432&quot;&gt;&lt;del&gt;SERVER-4432&lt;/del&gt;&lt;/a&gt; be more defensive against blank names&lt;/p&gt;

&lt;p&gt;Improve code in previous checkin to defend against &quot;function   (&quot;&lt;br/&gt;
as well as &quot;function(&quot;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/95a4c9fbd90efeac9c5e9ed9c3eac74f2611f3c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/95a4c9fbd90efeac9c5e9ed9c3eac74f2611f3c2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="72702" author="auto" created="Tue, 13 Dec 2011 11:21:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;&apos;, u&apos;name&apos;: u&apos;Tad Marshall&apos;, u&apos;email&apos;: u&apos;tad@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4432&quot; title=&quot;Strange item in mongo shell&amp;#39;s autocomplete&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4432&quot;&gt;&lt;del&gt;SERVER-4432&lt;/del&gt;&lt;/a&gt; make &quot;cf_1_f_x) &lt;/p&gt;
{shellAutocomplete(x)}
&lt;p&gt;(&quot; go away&lt;/p&gt;

&lt;p&gt;Test for no function name specified and use a default name if the&lt;br/&gt;
function is unnamed.  Start private internal names with leading&lt;br/&gt;
underscores.  Provide a name for the function anyway.  Run the&lt;br/&gt;
shellAutocomplete function inside try/catch for safety.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9e0a78c91474bc12e17c28dc6d91a972d89db142&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9e0a78c91474bc12e17c28dc6d91a972d89db142&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="72701" author="tad" created="Tue, 13 Dec 2011 11:16:38 +0000"  >&lt;p&gt;A couple of things going on here.&lt;br/&gt;
1)  The code that runs the shellAutocomplete function creates a function in global scope.  I don&apos;t think it should do this.  Global scope should be reserved for the user and for functions that the shell is providing for the user to use.  Internal functions not meant to be called by the user should not be created in this scope.&lt;br/&gt;
2)  The name chosen isn&apos;t marked as &quot;private&quot; by starting it with an underscore.  We use one or two underscores to (sort of) hide things that don&apos;t need to be in the user&apos;s face.&lt;br/&gt;
3)  The code that creates the name assumes that if given a function, then that function will have a name.  Not so in this case, and the code that tries to extract the name instead ends up with the body of the function as part of the name.&lt;br/&gt;
4)  Since the function is going to be visible to the user (because of item 1) it should probably have a reasonable name so it doesn&apos;t look suspect.&lt;br/&gt;
I&apos;d rather not tackle item 1 because this bug isn&apos;t worth it in our final days with SpiderMonkey, but I can do the others.&lt;/p&gt;</comment>
                            <comment id="71033" author="tad" created="Tue, 6 Dec 2011 00:56:02 +0000"  >&lt;p&gt;Version 1.9.2 does this as well, so it&apos;s not new.&lt;/p&gt;

&lt;p&gt;19:51:29.88 C:\Bin\Mongo192x64&amp;gt; .\mongo --nodb&lt;br/&gt;
MongoDB shell version: 1.9.2&lt;br/&gt;
&amp;gt; cf&amp;lt;tab&amp;gt;_&lt;em&gt;1&lt;/em&gt;_f_x) &lt;/p&gt;
{shellAutocomplete(x)}
&lt;p&gt;(&lt;br/&gt;
Mon Dec 05 19:53:03 SyntaxError: missing ; before statement (shell):1&lt;br/&gt;
&amp;gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 13 Dec 2011 11:21:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 10 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_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 10 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrojxr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9274</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0dif:</customfieldvalue>

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