Bug 75628 - Calc sum function ignores NA() function -- EDITING
Summary: Calc sum function ignores NA() function -- EDITING
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: Other All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.3
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-02-28 22:33 UTC by Peter Beurle
Modified: 2020-05-15 12:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sum error example (10.47 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-28 22:33 UTC, Peter Beurle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Beurle 2014-02-28 22:33:41 UTC
Created attachment 94922 [details]
sum error example

When I have a list of numbers in calc and in the sum range I have the NA() function the total should be #N/A. This works correctly in V4.1 but in V4.2 I get the total of the list.

Sample attached with internal comment.
Comment 1 GerardF 2014-03-01 08:50:00 UTC
Reproducible with 4.3.0 alpha.

Errors are ignored by the SUM function, not only #N/A (#DIV/0, #REF!, #VALUE!, etc).
Comment 2 Kohei Yoshida 2014-03-07 23:00:46 UTC
Very interesting corner case.  I wasn't aware of this behavior.
Comment 3 Commit Notification 2014-03-07 23:06:52 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75628: Write unit 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-03-07 23:07:05 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75628: SUM should inherit error if one is present in its references.



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-03-07 23:08:30 UTC
4.2 backport request: https://gerrit.libreoffice.org/8504
Comment 6 Commit Notification 2014-03-10 14:11:30 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=e26f0c815cbb3ca2c912b9ed85470d7666564027&h=libreoffice-4-2

fdo#75628: SUM should inherit error if one is present in its references.


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 7 Kohei Yoshida 2014-03-10 14:13:17 UTC
Fixed.