<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:46 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-1351] GLE upserted _id field should always be filled in</title>
                <link>https://jira.mongodb.org/browse/SERVER-1351</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;the id isn&apos;t included in at least two cases where it probably should for consistency&lt;/p&gt;

&lt;p&gt;if the _id wasn&apos;t generated server-side:&lt;br/&gt;
&amp;gt; db.foo.update({_id:&apos;asdf&apos;}, {$set: {a:&apos;123&apos;}}, true)&lt;br/&gt;
&amp;gt; db.getLastErrorObj()&lt;/p&gt;
{ &quot;err&quot; : null, &quot;updatedExisting&quot; : false, &quot;n&quot; : 1, &quot;ok&quot; : true }
&lt;p&gt;&amp;gt; db.foo.update(&lt;/p&gt;
{a:&apos;asdf&apos;}
&lt;p&gt;, {_id: &apos;qwer&apos;}, true)&lt;br/&gt;
&amp;gt; db.getLastErrorObj()&lt;/p&gt;
{ &quot;err&quot; : null, &quot;updatedExisting&quot; : false, &quot;n&quot; : 1, &quot;ok&quot; : true }



&lt;p&gt;if the object already existed:&lt;/p&gt;

&lt;p&gt;&amp;gt; db.foo.update({_id:{$gt:  ObjectId(&quot;4c2e342e38535540224f7945&quot;)}}, {$set: {a:&apos;123&apos;}}, true)&lt;br/&gt;
&amp;gt; db.getLastErrorObj()&lt;/p&gt;
{
	&quot;err&quot; : null,
	&quot;updatedExisting&quot; : false,
	&quot;upserted&quot; : ObjectId(&quot;4c2e346538535540224f7946&quot;),
	&quot;n&quot; : 1,
	&quot;ok&quot; : true
}
&lt;p&gt;&amp;gt; db.foo.update({_id:{$gt:  ObjectId(&quot;4c2e342e38535540224f7945&quot;)}}, {$set: {a:&apos;123&apos;}}, true)&lt;br/&gt;
&amp;gt; db.getLastErrorObj()&lt;/p&gt;
{ &quot;err&quot; : null, &quot;updatedExisting&quot; : true, &quot;n&quot; : 1, &quot;ok&quot; : true }</description>
                <environment></environment>
        <key id="12330">SERVER-1351</key>
            <summary>GLE upserted _id field should always be filled in</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="scotthernandez">Scott Hernandez</assignee>
                                    <reporter username="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Jul 2010 14:51:43 +0000</created>
                <updated>Tue, 27 Oct 2015 14:16:23 +0000</updated>
                            <resolved>Fri, 11 Oct 2013 15:10:05 +0000</resolved>
                                                    <fixVersion>2.5.3</fixVersion>
                                    <component>Write Ops</component>
                                        <votes>3</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="439588" author="scotthernandez" created="Fri, 11 Oct 2013 15:10:05 +0000"  >&lt;p&gt;For the docs we need to remove any mention that we return only an ObjectId, if that is in the docs anywhere else.&lt;/p&gt;

&lt;p&gt;Wrong info here:&lt;br/&gt;
&lt;a href=&quot;http://docs.mongodb.org/manual/reference/command/findAndModify/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/command/findAndModify/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="439394" author="auto" created="Fri, 11 Oct 2013 01:52:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;scotthernandez&apos;, u&apos;name&apos;: u&apos;Scott Hernandez&apos;, u&apos;email&apos;: u&apos;scotthernandez@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1351&quot; title=&quot;GLE upserted _id field should always be filled in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1351&quot;&gt;&lt;del&gt;SERVER-1351&lt;/del&gt;&lt;/a&gt;: return new _id from inserted doc from update&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/80c79f8464d26ca128b2455a8e02c9882f8c4640&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/80c79f8464d26ca128b2455a8e02c9882f8c4640&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="389976" author="scotthernandez" created="Sat, 27 Jul 2013 12:28:34 +0000"  >&lt;p&gt;Updated jstests/upsert1.js which fails (on both old and new update code)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="14887">SERVER-2625</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="89818">DOCS-1951</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="135348">SERVER-13865</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="83230">SERVER-10302</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12045">SERVER-1173</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="79461">SERVER-9958</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="29272" name="upsert1.js" size="746" author="scotthernandez" created="Sat, 27 Jul 2013 12:28:34 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 27 Jul 2013 12:28:34 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 18 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>auto</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpkav:</customfieldvalue>

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

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

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