Bug 75228 - FUNCTION COUNT
Summary: FUNCTION COUNT
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.2
Keywords: regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-02-19 21:12 UTC by JJ Palacios
Modified: 2014-02-24 23:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JJ Palacios 2014-02-19 21:12:11 UTC
COUNT(Value1; Value2; ... Value30)
Value1; Value2, ... are 1 to 30 values or ranges representing the values to be counted.
Example
Cells A1=2, A2=4, A3=6, so range A1:A3 is in 1 field. The entries 2, 4, 6 and eight in the Value 2-5 fields are to be counted.

=COUNT(A1:A3) = 3. The count of numbers is therefore 3.
=COUNT(A1:A3;2;4;6;"eight") = 4 ???
=COUNT(A1:A3;"2";4;6;"eight") = 4 ???
=COUNT(A1:A3;"2";"4";"6";"eight") = 6 ???

It's not compatible with previous versions
Comment 1 m_a_riosv 2014-02-20 04:07:52 UTC
Hola JJ, thanks for reporting.

Reproducible with:
Win7x64Ultimate
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b
Regression from:
Version: 4.1.6.0.0+ Build ID: 2e2040401d99fe116b65b9661c3d4755091a660



Seems as the range is well counted when it is the last parameter in the function.
=COUNT("2";4;6;"eight";A1:A3) = 6.
=COUNT("2";4;6;"eight";A1:A3;A1:A3) = 9.

Added to MAB 4.2, unusable function with data loss and difficult detect it.
Comment 2 Kohei Yoshida 2014-02-20 05:25:14 UTC
Not good.
Comment 3 Commit Notification 2014-02-20 05:29:10 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e50f17ace67dc7dc1680494567d74b4c76ce21d3

fdo#75228: Add test for this.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2014-02-20 05:29:24 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e183fbfdbfbe364d17f9d36a0b33d2fae89862d

fdo#75228: We still need to get the value only to pop value from the stack.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Kohei Yoshida 2014-02-20 05:29:47 UTC
4.2 backport: https://gerrit.libreoffice.org/8141
Comment 6 Kohei Yoshida 2014-02-20 05:30:07 UTC
This one was a really just a silly mistake. :-P
Comment 7 Commit Notification 2014-02-20 12:48:18 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b8365f8649251298e2ba6a3a0109620b5586e172&h=libreoffice-4-2

fdo#75228: We still need to get the value only to pop value from the stack.


It will be available in LibreOffice 4.2.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Kohei Yoshida 2014-02-20 14:34:25 UTC
Fixed.
Comment 9 Commit Notification 2014-02-21 12:48:23 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=165ab67a284efc75d3ed07c4dd2b03a430959481&h=libreoffice-4-2-2

fdo#75228: We still need to get the value only to pop value from the stack.


It will be available already in LibreOffice 4.2.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 m_a_riosv 2014-02-24 23:46:37 UTC
Thanks Kohei.
Verified fixed
Win7x64Ultimate
Version: 4.2.3.0.0+ Build ID: 5fd90cdd1fdb20ab7f6a2b67c384f0994f09a86b
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-02-21_22:38:15
Version: 4.3.0.0.alpha0+ Build ID: d84ccb39b744457cd47125beb4291c84223d5219
   TinderBox: Win-x86@39, Branch:master, Time: 2014-02-22_10:05:06