<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:57: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>[SERVER-1765] self referential updates? WAS: allow access to old row value during update</title>
                <link>https://jira.mongodb.org/browse/SERVER-1765</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Right now, you can&apos;t access the old value of a row during an update. You have to decide what each field you want to update should look like on the client side. So you can&apos;t do:&lt;br/&gt;
{ $set : { &quot;creation_timestamp&quot; : coalesce(old.creation_timestamp, &amp;lt;now&amp;gt;) }}&lt;br/&gt;
or:&lt;br/&gt;
{ $set : { &quot;priority&quot; : max(old.priority, 3) }}&lt;br/&gt;
or:&lt;br/&gt;
{ $set : { &quot;widgets_being_processed&quot; : old.widgets_needing_processing }}&lt;/p&gt;

&lt;p&gt;... or any equivalent.&lt;/p&gt;

&lt;p&gt;You can do this kind of thing with two queries, but that has potential performance and concurrency problems.&lt;/p&gt;

&lt;p&gt;From what I know of the Mongo architecture I don&apos;t see why access to this information should be impossible. I don&apos;t know what the syntax would be, of course.&lt;/p&gt;

&lt;p&gt;See also my original email question: &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/1c7b424cf9ef48e8/877621f662ca4cc0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/1c7b424cf9ef48e8/877621f662ca4cc0&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="13056">SERVER-1765</key>
            <summary>self referential updates? WAS: allow access to old row value during update</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="davidajudd">David Judd</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Sep 2010 19:16:44 +0000</created>
                <updated>Tue, 6 Dec 2022 05:48:13 +0000</updated>
                            <resolved>Sat, 29 Jun 2019 07:29:37 +0000</resolved>
                                                                    <component>Write Ops</component>
                                        <votes>37</votes>
                                    <watches>39</watches>
                                                                                                                <comments>
                            <comment id="2305625" author="asya" created="Sat, 29 Jun 2019 07:29:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40381&quot; title=&quot;Add the ability to specify a pipeline to an update command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40381&quot;&gt;&lt;del&gt;SERVER-40381&lt;/del&gt;&lt;/a&gt; implemented support for aggregation expressions to specify update for 4.2.&#160;&lt;/p&gt;

&lt;p&gt;You can see some examples &lt;a href=&quot;https://docs.mongodb.com/master/reference/command/update/index.html#update-command-example-agg&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives complete access to all existing fields in the document to make updates described in this ticket.&lt;/p&gt;</comment>
                            <comment id="2003924" author="zhouao" created="Sat, 15 Sep 2018 08:34:30 +0000"  >&lt;p&gt;&#36825;&#20010;&#38382;&#39064;&#25552;&#20986;&#24555;&#21313;&#24180;&#20102;&#65292;&#37117;&#27809;&#24471;&#21040;&#35299;&#20915;&#65292;mongodb&#24320;&#21457;&#32452;&#25928;&#29575;&#22826;&#20302;&#20102;&#12290;&lt;/p&gt;</comment>
                            <comment id="1234265" author="maddy" created="Wed, 13 Apr 2016 07:05:22 +0000"  >&lt;p&gt;This will be great feature to have! I hope it will be taken up soon!&lt;/p&gt;</comment>
                            <comment id="1086477" author="rey888" created="Thu, 12 Nov 2015 09:43:18 +0000"  >&lt;p&gt;Any update? Thanks in Advance!!!&lt;/p&gt;</comment>
                            <comment id="1031351" author="ihavenoemail@163.com" created="Wed, 16 Sep 2015 06:20:09 +0000"  >&lt;p&gt;Any update?&lt;/p&gt;</comment>
                            <comment id="1003947" author="3lricko" created="Thu, 13 Aug 2015 00:52:29 +0000"  >&lt;p&gt;This issue was created on 2010 &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Is there any possibility that this issue could be addressed this year? &lt;br/&gt;
Any reference you could provide about what is the best practice for this? I&apos;m learning mongodb and it&apos;s kind of shocking not to have this functionality. Tks in advance!&lt;/p&gt;</comment>
                            <comment id="728793" author="davparker" created="Sat, 27 Sep 2014 15:07:55 +0000"  >&lt;p&gt;I&apos;m looking for this capability as well. Seems like it should be a fundamental feature with update.&lt;br/&gt;
Looking forward to when the solution is implemented.&lt;/p&gt;</comment>
                            <comment id="604753" author="yashiikagupta" created="Mon, 2 Jun 2014 10:12:39 +0000"  >&lt;p&gt;Whats the progress? Can we use/append/prepend a string to old value of field while updating that field??&lt;/p&gt;</comment>
                            <comment id="311211" author="justanyone" created="Thu, 11 Apr 2013 15:32:56 +0000"  >&lt;p&gt;We&apos;re looking for this, too.  In our document:&lt;/p&gt;

&lt;p&gt;doc = &lt;/p&gt;
{ ... &apos;keyname&apos; : &apos;ABCDE&apos; ... }

&lt;p&gt;We&apos;d like to do the following as in-place modifications to strings:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;append a string to an existing string ($append:
{&apos;keyname&apos; : &apos;FG&apos;}
&lt;p&gt; ) resulting in &apos;ABCDEFG&apos;;&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;prepend a string to an existing string ($prepend:
{&apos;keyname&apos; : &apos;FG&apos;}
&lt;p&gt; ) resulting in &apos;FGABCDE&apos;;&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;remove characters from the front of a string ($lcut : 
{&apos;keyname&apos; : 2 }
&lt;p&gt; ) resulting in &apos;CDE&apos;;&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;remove characters from the end of a string   ($rcut : 
{&apos;keyname&apos; : 2 }
&lt;p&gt; ) resulting in &apos;ABC&apos;;&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;trim whitespace from left, right or both sides;&lt;/li&gt;
	&lt;li&gt;change a string into a substring (start, length) of itself;&lt;/li&gt;
	&lt;li&gt;remove characters before or after a substring;&lt;/li&gt;
	&lt;li&gt;regex substitutions (Perl-like) on a string.  For instance:
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ $regexSub:{&apos;field&apos;:&apos;keyname&apos;,&apos;searchRegex&apos;:&apos;(.*)CD(.*)&apos;,&apos;replRegex&apos;:&apos;\1__new__\2&apos;,&apos;flags&apos;:&apos;gi&apos;}} &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;resulting in &apos;AB_&lt;em&gt;new&lt;/em&gt;_E&apos;;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="297115" author="battal84" created="Sun, 24 Mar 2013 15:49:30 +0000"  >&lt;p&gt;Any progress on this issue?&lt;/p&gt;</comment>
                            <comment id="17984" author="eliot" created="Thu, 9 Sep 2010 19:20:52 +0000"  >&lt;p&gt;We should make the syntax work for queries as well&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="230551">SERVER-20510</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="10945">SERVER-458</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="95566">SERVER-11345</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 9 Sep 2010 19:20:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 32 weeks, 4 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1021</customfieldvalue>
                        </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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 32 weeks, 4 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>battal84</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>davidajudd</customfieldvalue>
            <customfieldvalue>davparker</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ihavenoemail@163.com</customfieldvalue>
            <customfieldvalue>justanyone</customfieldvalue>
            <customfieldvalue>maddy</customfieldvalue>
            <customfieldvalue>rey888</customfieldvalue>
            <customfieldvalue>3lricko</customfieldvalue>
            <customfieldvalue>yashiikagupta</customfieldvalue>
            <customfieldvalue>zhouao</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpfhj:</customfieldvalue>

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

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

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