<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:09:05 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-25401] Add Random.choice() method to the shell</title>
                <link>https://jira.mongodb.org/browse/SERVER-25401</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There are many tests that do random selections from arrays, or write helper functions to do so for them. We should add a &lt;tt&gt;Random.choice()&lt;/tt&gt; to remove the need for all these custom helpers.&lt;/p&gt;

&lt;p&gt;Name chosen to match &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.3.10/jstests/noPassthrough/geo_full.js#L297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;python&apos;s &lt;tt&gt;random.choice&lt;/tt&gt;&lt;/a&gt;, but I don&apos;t really care what the name is.&lt;/p&gt;

&lt;p&gt;Examples of places that could benefit from such functionality:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.3.10/jstests/noPassthrough/geo_full.js#L297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;jstests/noPassthrough/geo_full.js&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.3.10/jstests/aggregation/sources/facet/use_cases.js#L14&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;jstests/aggregation/sources/facet/use_cases.js&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.3.10/jstests/concurrency/fsm_workloads/indexed_insert_text.js#L123&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;jstests/concurrency/fsm_workloads/indexed_insert_text.js&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="305962">SERVER-25401</key>
            <summary>Add Random.choice() method to the shell</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-stm">Backlog - Server Tooling and Methods (STM)</assignee>
                                    <reporter username="charlie.swanson@mongodb.com">Charlie Swanson</reporter>
                        <labels>
                            <label>move-stm</label>
                    </labels>
                <created>Tue, 2 Aug 2016 17:44:10 +0000</created>
                <updated>Tue, 6 Dec 2022 04:19:59 +0000</updated>
                            <resolved>Fri, 19 Nov 2021 20:48:52 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4201772" author="brooke.miller" created="Fri, 19 Nov 2021 20:48:52 +0000"  >&lt;p&gt;STM doesn&apos;t have bandwidth to pick this up, so we&apos;re closing as won&apos;t fix. However, if other teams have capacity and would like to pursue this, please feel free to pick this up.&lt;/p&gt;</comment>
                            <comment id="1371247" author="charlie.swanson" created="Mon, 29 Aug 2016 21:55:36 +0000"  >&lt;p&gt;Ok, that sounds reasonable. Will do if it comes up, thanks.&lt;/p&gt;</comment>
                            <comment id="1371205" author="jason.carey" created="Mon, 29 Aug 2016 21:25:59 +0000"  >&lt;p&gt;Ah, sorry, didn&apos;t mean to say that you marked it required, but rather that it&apos;s behind a bunch of actually 3.3. required work in line.  I&apos;m suggesting that if you want it now, or before we get to it (after our 3.3. requireds), that you drop it into a util lib.&lt;/p&gt;

&lt;p&gt;We can clean it up, or use it in other use cases, after 3.4&lt;/p&gt;</comment>
                            <comment id="1371081" author="charlie.swanson" created="Mon, 29 Aug 2016 19:45:03 +0000"  >&lt;p&gt;Ok. I don&apos;t recall marking it 3.3 Required? That seems optimistic... Could we add it quickly to the shell in the short term and schedule the larger refactor separately? Or, could I do that later the next time I write a test that needs a &lt;tt&gt;choice()&lt;/tt&gt;?&lt;/p&gt;</comment>
                            <comment id="1371054" author="jason.carey" created="Mon, 29 Aug 2016 19:25:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt; - Also, this isn&apos;t really 3.3 required, so I&apos;m going to push this out to planning bucket a.  If you need it in the short run you&apos;re welcome to it.  Otherwise we&apos;ll tackle it after 3.4&lt;/p&gt;</comment>
                            <comment id="1371050" author="jason.carey" created="Mon, 29 Aug 2016 19:24:06 +0000"  >&lt;p&gt;I think the angle I want to take is to add new things like this to a utility library, but also to make that generally available for jstests (probably via resmoke).  That way it won&apos;t be an unnecessary load on developers writing the tests, but also won&apos;t increase the amount of code we have to externally support in the shell.&lt;/p&gt;

&lt;p&gt;So let&apos;s do jstests/libs/random.js and I&apos;ll link in another ticket for the resmoke changes to make it generally available.&lt;/p&gt;</comment>
                            <comment id="1370966" author="charlie.swanson" created="Mon, 29 Aug 2016 18:20:00 +0000"  >&lt;p&gt;I don&apos;t really have strong opinions on where it gets defined. It could be in a utility, but then shouldn&apos;t most/all of the random utility? It seems weird that you get most of the methods on &lt;tt&gt;Random&lt;/tt&gt; by default, but need to load something else to get this other one. It would be easier to just always load &lt;tt&gt;jstests/libs/random.js&lt;/tt&gt; or something whenever I reference &lt;tt&gt;Random&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;But really I just want to avoid typing the same code over and over again, so a utility would be fine.&lt;/p&gt;</comment>
                            <comment id="1370834" author="jason.carey" created="Mon, 29 Aug 2016 17:21:29 +0000"  >&lt;p&gt;I&apos;m not in favor of adding more random helpers to the shell that exist entirely for tests.&lt;/p&gt;

&lt;p&gt;Is there a reason to have this in the shell, instead of in a utility library loaded in by jstests? (like the other files in jstests/libs)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="312553">SERVER-25857</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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25142"><![CDATA[Server Tooling & Methods]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 29 Aug 2016 17:21:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 11 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-25857'>SERVER-25857</a></s>]]></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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 11 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-stm</customfieldvalue>
            <customfieldvalue>brooke.miller@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk0pb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1227">Platforms 2016-08-26</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|hs9v6f:</customfieldvalue>

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