<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:13:19 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-6986] ObjectId#toString and ObjectId#valueOf</title>
                <link>https://jira.mongodb.org/browse/SERVER-6986</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;2.2.0 changed the behavior of ObjectId#toString and ObjectId#valueOf. In 2.0.x&lt;br/&gt;
ObjectId#toString would return an object ID string, like &quot;50490f24a5b26b22e7000001&quot;, while in 2.2.0 it returns a string like &quot;ObjectId(\&quot;50490f24a5b26b22e7000001\&quot;)&quot;. &lt;/p&gt;

&lt;p&gt;This change breaks our MR jobs that use object IDs as object literal keys, e.g.&lt;/p&gt;

&lt;p&gt;var userEvent = {};&lt;br/&gt;
userEvent&lt;span class=&quot;error&quot;&gt;&amp;#91;this.user_id&amp;#93;&lt;/span&gt; = 1;&lt;br/&gt;
emit(key, userEvent);&lt;/p&gt;

&lt;p&gt;Through some experimentation we found that ObjectId#valueOf in 2.2.0 returns a representation that we need, i.e. &quot;50490f24a5b26b22e7000001&quot;. However, we also found that the behavior of ObjectId#valueOf was different in 2.0.x, where it return the object itself. &lt;/p&gt;

&lt;p&gt;We couldn&apos;t find any documentation on ObjectId#valueOf and we&apos;re concerned that its behavior could change in future releases again. Can we rely on #valueOf remaining the same in the future? Or is there a more reliable way to convert ObjectId to a string, given that the 2.2.0 ObjectId#toString result is unusable for our purposes?&lt;/p&gt;</description>
                <environment></environment>
        <key id="50076">SERVER-6986</key>
            <summary>ObjectId#toString and ObjectId#valueOf</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="alexeits">Alex Tsibulya</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Sep 2012 15:58:57 +0000</created>
                <updated>Fri, 15 Feb 2013 15:06:19 +0000</updated>
                            <resolved>Fri, 28 Sep 2012 20:55:04 +0000</resolved>
                                    <version>2.2.0</version>
                                                                        <votes>1</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="169386" author="milkie" created="Fri, 28 Sep 2012 20:53:53 +0000"  >&lt;p&gt;I filed a documentation ticket and we&apos;re now actively working on documenting the overrides of .valueOf() and .toString() for the custom MongoDB Javascript types.  I don&apos;t expect the behavior to change ever again; the change in 2.1 was done with the intent of standardizing the behavior &amp;#8211; see &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;.  The correct way, going forward, to extract the hexadecimal value of an ObjectId as a string is to use .valueOf().&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="51765">DOCS-563</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="52548">DOCS-586</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15002">SERVER-2684</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 12 Sep 2012 15:27:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 20 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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 20 weeks, 5 days 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alexeits</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnpbr:</customfieldvalue>

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

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

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