<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:52:56 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-64] Ints are converted to Float in Javascript</title>
                <link>https://jira.mongodb.org/browse/SERVER-64</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When integers are inserted using javascript either in the Mongo shell, or using db.eval(), they seem to be converted to Floats.&lt;/p&gt;

&lt;p&gt;In the attached Ruby code the db.eval() created document has converted the integer 1 value into a float 1 value.&lt;/p&gt;

&lt;p&gt;Similarly, if you insert a &lt;/p&gt;
{ &quot;test&quot; : 1 }
&lt;p&gt; document from Mongo shell, and then retrieve it using the Ruby driver it comes back as a Float 1.0.&lt;/p&gt;</description>
                <environment>Self-built Linux 64-bit, current to master head:&lt;br/&gt;
Fri May 22 02:45:00 git version: 87372071fca2cd49a67085bc80d1c1a3fb9b2202&lt;br/&gt;
&lt;br/&gt;
Running latest Ruby driver, also built from latest git: dc44751d2fb18a8be1f301ecac24e675d4da2b0e</environment>
        <key id="10156">SERVER-64</key>
            <summary>Ints are converted to Float in Javascript</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="goosmurf">Yun Huang Yong</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 May 2009 23:17:22 +0000</created>
                <updated>Mon, 2 Nov 2009 12:14:41 +0000</updated>
                            <resolved>Thu, 21 May 2009 23:26:32 +0000</resolved>
                                    <version>0.9.3</version>
                                                    <component>JavaScript</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="10137" author="eliot" created="Thu, 21 May 2009 23:37:20 +0000"  >&lt;p&gt;Yeah - the java javascript engine did some weird things with numbers.&lt;/p&gt;

&lt;p&gt;We could do something to preserve types across.&lt;/p&gt;

&lt;p&gt;I&apos;ll make a new case for that&lt;/p&gt;</comment>
                            <comment id="10136" author="goosmurf" created="Thu, 21 May 2009 23:30:59 +0000"  >&lt;p&gt;Hmmm, I only noticed this because using the db.eval() to copy objects from one collection to another, you would expect that the copied collection has exactly the same data (and type) as the original.&lt;/p&gt;

&lt;p&gt;Its weird that I can insert a Ruby Fixnum 1, run the db.eval() copy, then retrieve a Float 1.0.&lt;/p&gt;

&lt;p&gt;This wasn&apos;t the case on the previous nightly I was running (from 4th May).&lt;/p&gt;</comment>
                            <comment id="10135" author="eliot" created="Thu, 21 May 2009 23:26:32 +0000"  >&lt;p&gt;all numbers in javascript are floats - so if you use db.eval everything will be a float.&lt;/p&gt;

&lt;p&gt;i guess we could add some hacky thing in javascript to get you integers - but would be working around javascript. &lt;/p&gt;

&lt;p&gt;if this is something you require - let us know&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10006" name="javascript_numbers.rb" size="533" author="goosmurf" created="Thu, 21 May 2009 23:17:22 +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>Thu, 21 May 2009 23:26:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 39 weeks, 6 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>
                            14 years, 39 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>goosmurf</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpydj:</customfieldvalue>

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

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

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