Bug 77728 - Countif and Countifs Not Counting Second Set of Added Data
Summary: Countif and Countifs Not Counting Second Set of Added Data
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: high major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-04-21 12:47 UTC by dmdcomputing
Modified: 2014-05-07 01:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Countif and Countifs Example (22.55 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-04-21 12:47 UTC, dmdcomputing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmdcomputing 2014-04-21 12:47:07 UTC
Created attachment 97689 [details]
Countif and Countifs Example

Windows 7 64 Home Premium SP1; LibreOffice 4.2.4.1 (RC1) and 4.2.3

The countif and countifs functions are not counting second and subsequent rows of data entered by copying, autocomplete, or via the selection list.

Attached example has two sheets: data and summaries.  On the data sheet, the Fruit column is named Fruit_Data and the season column is named Season_Data.  The data contains a dummy row, above which new rows are to be inserted.  The summaries sheet counts the number of fruits (countif) and fruits plus seasons (countifs). The data sheet contains four entries for apples and three for pears; plus two apples with the season autumn, two apples with winter, and three pears with autumn.

Insert one row above the dummy row and enter, say, "Pears" and "Autumn"; the countif and countifs update.

Close and re-open the file.  Insert two rows and enter, say, "Pears" and "Autumn" in both rows.  The countif and countifs functions do not count the second row.  even if the second additional row data is changed from "Pears" and "Autumn" to, say, "Apples" and "Winter" via copying, autocomplete or the selection list, the functions do not update.  Changing the first additional row data results in the functions updating (although they still ignore the second additional data row).
Comment 1 m_a_riosv 2014-04-22 02:11:41 UTC
Hi @dmdcaretwo@care2.com, thanks for reporting.

Reproducible with:
Win7x64Ultimate
Versión: 4.2.3.3 Id. de compilación: 882f8a0a489bc99a9e60c7905a60226254cb6ff0
Version: 4.2.4.1 Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515
Version: 4.3.0.0.alpha0+ Build ID: 0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171
   TinderBox: Win-x86@39, Branch:master, Time: 2014-04-17_00:11:33

Added two or more rows (from row 9) of data only data in the first row is counted. Neither recalc F9 or hard recalc Ctrl+Shift+F9 works, but double equal instead a single equal beginning the formula makes it works.

Regression from:
Version: 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
Comment 2 Kohei Yoshida 2014-04-25 01:13:20 UTC
I got it.  This is not specific to COUNTIF and COUNTIFS.  It happens with any cell functions.
Comment 3 Commit Notification 2014-04-25 04:58:42 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77728: Write 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-04-25 04:58:57 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77728: Don't forget to start listening after the named range update.



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 Commit Notification 2014-04-25 04:59:11 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77728: Add test case for named range expansion and formula update.



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 6 Commit Notification 2014-04-25 04:59:25 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77728: Re-compile tokens when named range is updated.



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 7 Kohei Yoshida 2014-04-25 05:03:51 UTC
For 4.2:

https://gerrit.libreoffice.org/9156
https://gerrit.libreoffice.org/9157

The first fix is for a bug I discovered while debugging this.  It is very close to the bug originally reported here but not exactly the same one.  The second one is the one that fixes the case exhibited by the test document.
Comment 8 Commit Notification 2014-04-25 16:11:36 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=160bcf5357fb565b2f27f8b12e75d408f939e069&h=libreoffice-4-2

fdo#77728: Don't forget to start listening after the named range update.


It will be available in LibreOffice 4.2.5.

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 9 Commit Notification 2014-04-25 16:11:50 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=6b7f07e3dbd990fd63c707d9297b4715e6e3957d&h=libreoffice-4-2

fdo#77728: Re-compile tokens when named range is updated.


It will be available in LibreOffice 4.2.5.

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 Kohei Yoshida 2014-04-25 16:19:39 UTC
This one is fixed as well.
Comment 11 m_a_riosv 2014-05-07 01:18:28 UTC
Verified with:
Win7x64Ultimate
Version: 4.2.5.0.0+ Build ID: b26b9606efa30c0a44e20dcf638fbd1e27f05089
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-06_06:43:43
Version: 4.3.0.0.alpha1+ Build ID: a1dd961c3093f5f7624e4d1f2240e9120fd13f23
   TinderBox: Win-x86@39, Branch:master, Time: 2014-05-06_11:47:48