<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:24:29 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-10958] Provide _id and error for failed document from multi-update</title>
                <link>https://jira.mongodb.org/browse/SERVER-10958</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When i do update operation with more than one condition, if condition fails i can check whether update succeded or failed using getLastError.&lt;br/&gt;
But i can not get which condition failed. If mongodb provides, this will be helpful for my application.&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS 64 bit</environment>
        <key id="92040">SERVER-10958</key>
            <summary>Provide _id and error for failed document from multi-update</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="jkrishh">jayakrishnan</reporter>
                        <labels>
                            <label>error-messages</label>
                            <label>getlasterror</label>
                    </labels>
                <created>Mon, 30 Sep 2013 13:05:57 +0000</created>
                <updated>Mon, 11 Jul 2016 17:37:51 +0000</updated>
                            <resolved>Tue, 8 Oct 2013 14:36:19 +0000</resolved>
                                                    <fixVersion>2.5.3</fixVersion>
                                    <component>Write Ops</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="437174" author="auto" created="Tue, 8 Oct 2013 14:06:01 +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-10958&quot; title=&quot;Provide _id and error for failed document from multi-update&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10958&quot;&gt;&lt;del&gt;SERVER-10958&lt;/del&gt;&lt;/a&gt;: Update error messages and provide _id of error docs&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4b5cfc190c702aad25a353d8b3e275f71599b05f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4b5cfc190c702aad25a353d8b3e275f71599b05f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="435227" author="scotthernandez" created="Thu, 3 Oct 2013 15:44:31 +0000"  >&lt;p&gt;Okay, then this isn&apos;t really what you are asking for. &lt;/p&gt;

&lt;p&gt;Please ask your question about your language/driver on the mongodb-user forum (&lt;a href=&quot;https://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/group/mongodb-user&lt;/a&gt;) as that is where you are going to get a typed exception or error message you can act on in your application code. If you are calling getLastError manually you should be using a write concern instead in your application code.&lt;/p&gt;</comment>
                            <comment id="434518" author="jkrishh" created="Wed, 2 Oct 2013 13:47:46 +0000"  >&lt;p&gt;I am developing a application for project management tool (web app) . I  have a collection of  &quot;projects&quot;.Following is a document which represents a project&lt;br/&gt;
{&lt;br/&gt;
_id: &amp;lt;project id&amp;gt;,&lt;br/&gt;
name: &amp;lt;project-name&amp;gt;,&lt;br/&gt;
owner: &amp;lt;owner-id&amp;gt;&lt;br/&gt;
}&lt;br/&gt;
In my app project owner can update the name of a project.&lt;br/&gt;
User id can be obtained from session.&lt;br/&gt;
Here i will update like&lt;/p&gt;

&lt;p&gt;db.update({_id:&quot;projectId&quot;, owner: &quot;userId&quot;}, {&quot;$set&quot;: {&quot;name&quot;: &quot;new-name&quot;}});&lt;/p&gt;

&lt;p&gt;update can be failed due to wrong _id or unauthorized access.&lt;br/&gt;
I have to return proper error message based on the above scenario.&lt;/p&gt;

&lt;p&gt;I am not talking about multi update.&lt;/p&gt;</comment>
                            <comment id="433058" author="scotthernandez" created="Mon, 30 Sep 2013 13:18:05 +0000"  >&lt;p&gt;@jayakrishnan , I&apos;ve updated this to be what I think you were asking for, which is how to find the document which caused the update failure. Please add an example if you have one so we can confirm this is what you want, and if possible please provide an example of what you want to see as an error.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="43910">SERVER-6399</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 30 Sep 2013 13:18:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 19 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>
                            10 years, 19 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>jkrishh</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|hrmeen:</customfieldvalue>

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

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

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