<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:39:59 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>[DOCS-989] Information about scripting the JS shell is missing from the latest documentation.</title>
                <link>https://jira.mongodb.org/browse/DOCS-989</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Information from the old Wiki page is no longer available in the revised manual: see below for details&lt;/p&gt;</description>
                <environment>&lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/write-scripts-for-the-mongo-shell/&quot;&gt;http://docs.mongodb.org/manual/tutorial/write-scripts-for-the-mongo-shell/&lt;/a&gt;</environment>
        <key id="62055">DOCS-989</key>
            <summary>Information about scripting the JS shell is missing from the latest documentation.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="william.zola@10gen.com">William Zola</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jan 2013 20:27:30 +0000</created>
                <updated>Tue, 24 Sep 2013 16:16:16 +0000</updated>
                            <resolved>Tue, 17 Sep 2013 22:11:47 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="427487" author="auto" created="Tue, 17 Sep 2013 22:11:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tychoish&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-989&quot; title=&quot;Information about scripting the JS shell is missing from the latest documentation.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-989&quot;&gt;&lt;del&gt;DOCS-989&lt;/del&gt;&lt;/a&gt; additional edits&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/4933b1a75d574d0551d6e9dfb40fbca966801340&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/4933b1a75d574d0551d6e9dfb40fbca966801340&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="427467" author="william.zola@10gen.com" created="Tue, 17 Sep 2013 21:43:37 +0000"  >&lt;p&gt;Some information is still missing from the docs:  there&apos;s no mention of how the &apos;it&apos; command is not available in scripts.&lt;/p&gt;</comment>
                            <comment id="396418" author="auto" created="Mon, 5 Aug 2013 21:58:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tychoish&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-989&quot; title=&quot;Information about scripting the JS shell is missing from the latest documentation.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-989&quot;&gt;&lt;del&gt;DOCS-989&lt;/del&gt;&lt;/a&gt;: clarifying organization and adding a point about printing.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/2325d3fa10a45e7e3928d064520dd71c4ec478b9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/2325d3fa10a45e7e3928d064520dd71c4ec478b9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="396416" author="samk" created="Mon, 5 Aug 2013 21:55:12 +0000"  >&lt;p&gt;more edits coming soon.&lt;/p&gt;</comment>
                            <comment id="396414" author="auto" created="Mon, 5 Aug 2013 21:53:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tychoish&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-989&quot; title=&quot;Information about scripting the JS shell is missing from the latest documentation.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-989&quot;&gt;&lt;del&gt;DOCS-989&lt;/del&gt;&lt;/a&gt;: clarifying organization&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/f09b87830679bd06e4811687f637de9f9acada11&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/f09b87830679bd06e4811687f637de9f9acada11&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="240738" author="william.zola@10gen.com" created="Tue, 15 Jan 2013 20:33:29 +0000"  >&lt;p&gt;Here are the old documentation comments that are not present in the new version:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please be aware there are data format issues in javascript so you should be careful how much you do in Javascript.&lt;/p&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Printing&lt;/p&gt;

&lt;p&gt;When using the shell interactively, the shell will print returned values and format where possible. This is done as a general convenience from within the shell. However, when building a script, the printing needs to be defined explicitly.&lt;/p&gt;

&lt;p&gt;There are two functions commonly used for this:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;print(): works as normal javascript&lt;/li&gt;
	&lt;li&gt;printjson(): prints a nicely formatted JSON representation of the given object&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;use dbname&lt;/p&gt;

&lt;p&gt;This command does not work in scripted mode. Instead you will need to explicitly define the database in the connection &lt;/p&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;it&lt;/p&gt;

&lt;p&gt;The iterator command it does not work outside of the interactive scripting environment.&lt;/p&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;getLastError&lt;/p&gt;

&lt;p&gt;When running an update/insert command from the shell, the shell automatically awaits a reply (i.e. runs a get last error).&lt;/p&gt;

&lt;p&gt;The same is not true when running from a script file. To wait for the status of an operation (such as a write), run the getLastError function after update/insert.&lt;/p&gt;
&lt;/blockquote&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 5 Aug 2013 21:53:33 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 22 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
            <customfieldvalue>william.zola@10gen.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrs3uv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>39616</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|hrye07:</customfieldvalue>

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