<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:13 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-3153] The mongo shell needs better support for displaying and entering GUIDs/UUIDs</title>
                <link>https://jira.mongodb.org/browse/SERVER-3153</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Working with GUIDs in the mongo shell is painful. We need a better way to enter them. One suggestion, a factory method on BinData:&lt;/p&gt;

&lt;p&gt;&amp;gt; BinData.fromGuid(&quot;b4ebe978-bf69-489c-9d3e-bc6839d6de25&quot;)&lt;br/&gt;
BinData(3,&quot;tOvpeL9pSJydPrxoOdbeJQ==&quot;)&lt;br/&gt;
&amp;gt;&lt;/p&gt;

&lt;p&gt;Or some other usable alternative. The shell should also use the same notation on output so that it is more readable.&lt;/p&gt;

&lt;p&gt;One final problem: all existing C# drivers have been writing GUIDs in a binary representation where the first three fields of the GUID are little endian (because that&apos;s what Guid.ToByteArray happens to return), whereas all other drivers are using the more sensible big endian representation. So depending on which driver stored the GUID the string representation would be different. This is a really difficult problem to solve without backward compatibility problems. The shell is affected because it needs to know what byte order to use when converting the string representation of a GUID to an instance of BinData.&lt;/p&gt;</description>
                <environment></environment>
        <key id="17567">SERVER-3153</key>
            <summary>The mongo shell needs better support for displaying and entering GUIDs/UUIDs</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="3">Duplicate</resolution>
                                        <assignee username="geert.bosch@mongodb.com">Geert Bosch</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 May 2011 22:38:19 +0000</created>
                <updated>Mon, 25 Oct 2021 12:35:05 +0000</updated>
                            <resolved>Mon, 25 Oct 2021 12:34:44 +0000</resolved>
                                    <version>1.9.0</version>
                                                    <component>Shell</component>
                                        <votes>16</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="132219" author="rstam" created="Thu, 14 Jun 2012 00:12:37 +0000"  >&lt;p&gt;Ryan, I agree. In the meantime I&apos;ve attached a file of Javascript helper functions that could prove helpful to you. I wrote these to help me work with GUIDs in the mongo shell while working on the C# driver support for GUIDs.&lt;/p&gt;

&lt;p&gt;You can load these helper functions into the mongo shell by starting the mongo shell like this:&lt;/p&gt;

&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;mongo --shell uuidhelpers.js&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;The uuidhelpers.js file has some brief comments at the top that illustrate how to use the helper functions.&lt;/p&gt;</comment>
                            <comment id="132106" author="rhoffman" created="Wed, 13 Jun 2012 20:53:16 +0000"  >&lt;p&gt;This is a huge pain point for C# users.  Currently there is no way to convert between the C# GUID data type and BinData(3, &quot;&quot;) in the MongoDB shell.  Additionally, all GUIDs show as BinData(3, &quot;data&quot;), which is an extremely inconvenient way to view GUIDs.&lt;/p&gt;

&lt;p&gt;It would be great if .NET GUIDs would be a first class citizen in the MongoDB shell.&lt;/p&gt;</comment>
                            <comment id="69566" author="rstam" created="Tue, 29 Nov 2011 17:04:26 +0000"  >&lt;p&gt;This JIRA is related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt; but is partially in conflict with it.&lt;/p&gt;</comment>
                            <comment id="69565" author="rstam" created="Tue, 29 Nov 2011 17:03:35 +0000"  >&lt;p&gt;The implementation proposed in this JIRA issue is slightly at odds with that in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt; (which partially addresses improved support for UUIDs but doesn&apos;t address the various historical representations for UUIDs).&lt;/p&gt;

&lt;p&gt;An implementation of these methods as Javascript helper functions can be found at:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/master/uuidhelpers.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/blob/master/uuidhelpers.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;which can be looked at as a reference. Don&apos;t know if this JIRA will be implemented in C++ code or in Javascript (in the latter case the uuidhelpers.js file will turn out to be even more useful).&lt;/p&gt;</comment>
                            <comment id="67456" author="jeff.yemin" created="Thu, 17 Nov 2011 19:54:06 +0000"  >&lt;p&gt;It would also be nice if you could set an option at global/db/collection level to tell it what UUID representation to assume.  That way even subtype 3 binary data could be displayed as&lt;/p&gt;

&lt;p&gt;UUID(&quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;).&lt;/p&gt;

&lt;p&gt;So something like&lt;/p&gt;


&lt;p&gt;livearcmdb02:PRIMARY&amp;gt; use authoring&lt;br/&gt;
switched to db authoring&lt;br/&gt;
livearcmdb02:PRIMARY&amp;gt; db.setUUIDRepresentation(JavaLegacy)&lt;br/&gt;
livearcmdb02:PRIMARY&amp;gt; db.mtvi_content_record.findOne({},{_id:1})&lt;/p&gt;
{ &quot;_id&quot; : UUID(&quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;) }

</comment>
                            <comment id="41454" author="rstam" created="Sat, 9 Jul 2011 01:36:06 +0000"  >&lt;p&gt;Proposed implementation:&lt;/p&gt;

&lt;p&gt;New global functions:&lt;/p&gt;

&lt;p&gt;UUID (creates a binary subtype 4 UUID using standard byte order)&lt;br/&gt;
JUUID (creates a binary subtype 3 UUID using legacy Java driver byte order)&lt;br/&gt;
CSUUID (creates a binary subtype 3 UUID using legacy C# driver byte order)&lt;br/&gt;
PYUUID (creates a binary subtype 3 UUID using legacy Python driver byte order)&lt;/p&gt;

&lt;p&gt;All 4 global functions should ignore any of these characters in the input string: &quot;&lt;/p&gt;
{&quot;, &quot;-&quot;, &quot;}
&lt;p&gt;&quot; as they are commonly used in string representations of UUIDs.&lt;/p&gt;

&lt;p&gt;New methods attached to BinData prototype:&lt;/p&gt;

&lt;p&gt;toUUID (formats a binary subtype 4 UUID stored in standard byte order as a string)&lt;br/&gt;
toJUUID (formats a binary subtype 3 UUID stored using legacy Java driver byte order as a string)&lt;br/&gt;
toCSUUID (formats a binary subtype 3 UUID stored using legacy C# driver byte order as a string)&lt;br/&gt;
toPYUUID (formats a binary subtype 3 UUID stored using legacy Python driver byte order as a string)&lt;/p&gt;

&lt;p&gt;Changes to the shell:&lt;/p&gt;

&lt;p&gt;The shell should output binary subtype 4 values as:&lt;/p&gt;

&lt;p&gt;UUID(&quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;)&lt;/p&gt;

&lt;p&gt;The shell should output binary subtype 3 values as:&lt;/p&gt;

&lt;p&gt;HexData(3, &quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&quot;)&lt;/p&gt;

&lt;p&gt;(as opposed to JUUID, CSUUID or PYUUID because it doesn&apos;t know which byte order was used).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="300584">CSHARP-1708</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="382971">SERVER-29154</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="12092">SERVER-1201</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="935050">SERVER-43411</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="17669">SERVER-3168</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="17163" name="uuidhelpers.js" size="7130" author="robert@mongodb.com" created="Thu, 14 Jun 2012 00:08:13 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 17 Nov 2011 19:54:06 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 36 weeks 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>geert.bosch@mongodb.com</customfieldvalue>
            <customfieldvalue>jeff.yemin@mongodb.com</customfieldvalue>
            <customfieldvalue>robert@mongodb.com</customfieldvalue>
            <customfieldvalue>rhoffman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroz4v:</customfieldvalue>

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

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

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