<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:38: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>[DOCS-563] documentation for valueOf() and toString()</title>
                <link>https://jira.mongodb.org/browse/DOCS-563</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;valueOf() needs documentation.  Need examples of the difference between valueOf() and toString(), especially for ObjectId type.  The behavior of toString() changed in 2.2.  The old behavior was to convert the ObjectId into a bare string (thus losing its type information); the new behavior is to produce text that indicates that it is an ObjectId with a hex value.&lt;/p&gt;</description>
                <environment></environment>
        <key id="51765">DOCS-563</key>
            <summary>documentation for valueOf() and toString()</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="milkie@mongodb.com">Eric Milkie</reporter>
                        <labels>
                    </labels>
                <created>Fri, 28 Sep 2012 15:55:29 +0000</created>
                <updated>Mon, 30 Oct 2023 22:01:31 +0000</updated>
                            <resolved>Thu, 18 Oct 2012 22:04:47 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                                                            <comments>
                            <comment id="177094" author="auto" created="Fri, 19 Oct 2012 13:55:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T22:07:53-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; minor edits&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/4f6c70aef8355a186eeb43664a2378202244e67a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/4f6c70aef8355a186eeb43664a2378202244e67a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="177093" author="auto" created="Fri, 19 Oct 2012 13:55:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T21:27:03-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; fix links&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/c1ea7143f2e4b737d3dd8670975a672b984cc066&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/c1ea7143f2e4b737d3dd8670975a672b984cc066&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="177092" author="auto" created="Fri, 19 Oct 2012 13:55:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T21:11:01-07:00&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&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/74facd3722532ab47f09d3de5908616ace145825&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/74facd3722532ab47f09d3de5908616ace145825&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176911" author="auto" created="Thu, 18 Oct 2012 22:39:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T15:39:31-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&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/7864c2ba3c208f63955847517b11d4e07fe8ba18&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/7864c2ba3c208f63955847517b11d4e07fe8ba18&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176895" author="auto" created="Thu, 18 Oct 2012 22:22:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T15:22:24-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: edits: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; objectId file&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/a38372442818cdd28cd1f572f6d3b01265bde8fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/a38372442818cdd28cd1f572f6d3b01265bde8fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176891" author="auto" created="Thu, 18 Oct 2012 22:22:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-18T08:51:49-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; 586 add ObjectId() getTimestamp method and blurb&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/131715dd96262307d0461b3e7c8ac694bd4a1a3e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/131715dd96262307d0461b3e7c8ac694bd4a1a3e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176889" author="auto" created="Thu, 18 Oct 2012 22:22:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-17T15:30:58-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-586&quot; title=&quot;Document &amp;quot;str&amp;quot; property of ObjectId() in JavaScript (shell and server)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-586&quot;&gt;&lt;del&gt;DOCS-586&lt;/del&gt;&lt;/a&gt; minor cleanup of ObjectId&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/77bdcc09d704f792267d558c9a6350a9a32be175&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/77bdcc09d704f792267d558c9a6350a9a32be175&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176887" author="auto" created="Thu, 18 Oct 2012 22:22:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-17T15:26:49-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-586&quot; title=&quot;Document &amp;quot;str&amp;quot; property of ObjectId() in JavaScript (shell and server)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-586&quot;&gt;&lt;del&gt;DOCS-586&lt;/del&gt;&lt;/a&gt; edits to ObjectId doc&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/be7abf071b82d9b18416cd60306edb08becc4896&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/be7abf071b82d9b18416cd60306edb08becc4896&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="176886" author="auto" created="Thu, 18 Oct 2012 22:22:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-17T14:42:51-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-563&quot; title=&quot;documentation for valueOf() and toString()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-563&quot;&gt;&lt;del&gt;DOCS-563&lt;/del&gt;&lt;/a&gt;,586 ObjectId() class methods and field doc&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/a3917219374d57db8a9525b7388ac7c870b8b1d0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/a3917219374d57db8a9525b7388ac7c870b8b1d0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="169382" author="milkie" created="Fri, 28 Sep 2012 20:47:24 +0000"  >&lt;p&gt;I believe that any overrides of .toString() or .valueOf() are all found within mongo/shell/utils.js&lt;/p&gt;</comment>
                            <comment id="169378" author="milkie" created="Fri, 28 Sep 2012 20:43:04 +0000"  >&lt;p&gt;This external post has some of the philosophy behind the changes:&lt;br/&gt;
&lt;a href=&quot;http://javascriptweblog.wordpress.com/2010/05/03/the-value-of-valueof/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://javascriptweblog.wordpress.com/2010/05/03/the-value-of-valueof/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="169377" author="milkie" created="Fri, 28 Sep 2012 20:41:48 +0000"  >&lt;p&gt;I linked in the original server ticket, which has a description of the &quot;before&quot; and &quot;after&quot; formats for toString() for a variety of special types.&lt;br/&gt;
For valueOf(), after &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2684&quot; title=&quot;special types in shell (e.g. Timestamp) display in variety of ways, and can confuse users&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2684&quot;&gt;&lt;del&gt;SERVER-2684&lt;/del&gt;&lt;/a&gt; we started overriding it for ObjectID type, but we left its default behavior alone for other types, from what I can tell.&lt;/p&gt;</comment>
                            <comment id="169376" author="epc" created="Fri, 28 Sep 2012 20:40:40 +0000"  >&lt;p&gt;We&apos;ll figure it out&#8230;is it solely ObjectID that these affect?&lt;br/&gt;
ie, doesn&apos;t redefine valueof/tostring for all JS objects, just specific mongodb ones?&lt;/p&gt;</comment>
                            <comment id="169364" author="epc" created="Fri, 28 Sep 2012 20:21:58 +0000"  >&lt;p&gt;We don&apos;t presently document either of these (in docs or the wiki)&#8230;are the method changes specific to ObjectID or across all uses of .valueOf and .toString under the SM &amp;amp; v8 engines?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="52543">DOCS-584</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="50688">SERVER-7055</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="52548">DOCS-586</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15002">SERVER-2684</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="50076">SERVER-6986</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                            <subtask id="52543">DOCS-584</subtask>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 28 Sep 2012 20:21:58 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 17 weeks, 5 days 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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 17 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>epc</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrsatb:</customfieldvalue>

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

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

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