Bug 64229 - : SUMIF function gives Err:504 for external references
Summary: : SUMIF function gives Err:504 for external references
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: BSA target:4.2.0 target:4.1.0.0.beta2...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-05-05 01:48 UTC by Owen Genat (retired)
Modified: 2018-02-06 01:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example local (a.ods) and external (b.ods) references in SUMIF. (21.22 KB, application/zip)
2013-05-05 01:48 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Genat (retired) 2013-05-05 01:48:10 UTC
Created attachment 78870 [details]
Example local (a.ods) and external (b.ods) references in SUMIF.

Problem description: This appears to be a regression from v3.5.7.2/v3.6.6.2 to the v4.0 series. Bug #33002 was originally raised against the v3.3 series for the same problem. The attached pair of spreadsheets for that bug illustrate the same issue, however I have created a new pair of spreadsheets under v4.0.2.2 to ensure it is not related to the creating version.

Range and Sum Range references to an external spreadsheet (ODS file) within the SUMIF function produce an "Err:504" result. This does not occur if b.ods opened using v3.5.7.2, and reportedly v3.6.6.2 as indicated here: http://en.libreofficeforum.org/node/5859.

a.ods shows examples of using local references within the COUNTIF and SUMIF functions. Example text and numeric Range/Criteria are offered. In addition, Criteria both manually encoded (e.g., "yes" or "1") as well as cell references (e.g., C3 containing "yes" and E3 containing "1") are included.

b.ods shows examples of using external references (to a.ods) within the COUNTIF and SUMIF functions. The sames types (text and numeric) of example Range/Criteria and form of referencing (manual and cell) are offered. In addition, external references to Criteria (e.g., 'file:///home/oweng/doc/a.ods'#$Sheet1.C3 rather than C3) are included.

Steps to reproduce:
1. Unzip contents of attached to local directory.
2. Open the attached b.ods file under v4.0.2.2.
3. Confirm update of links.
4. Observe "Err:504" in all cells D6:D8 and F6:F8.
5. Close file (without updating).
6. Open the attached b.ods file under v3.5.7.2 (or v3.6.6.2).
7. Confirm update of links.
8. Observe correctly calculated cell values (4) in D6:D8 and F6:F8.

Current behavior:
Under v4.0.2.2 the external SUMIF cell references in the form: =SUMIF('file:///home/oweng/a.ods'#$Sheet1.C$6:C$8,"yes",'file:///home/oweng/a.ods'#$Sheet1.D$6:D$8) produce "Err:504". Under v3.5.7.2, and reportedly v3.6.6.2, the correctly calculated value (4 in all cases) is displayed.

Expected behavior:
The correctly calculated value (4 in all cases) is displayed.

If possible, can someone please confirm behaviour of the attached under v3.6.6.2.
              
Operating System: All
Version: 4.0.2.2 release
Comment 1 Owen Genat (retired) 2013-05-05 01:53:19 UTC
I forgot to mention that I set the platform to All as I have tested this under:

MacOS 10.6.8: v4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
Windows 6.1.7601 SP1 Build 7601: v4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
Ubuntu 10.04 x86_64: v4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3) and v3.5.7.2 (Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b)
Comment 2 m_a_riosv 2013-05-05 02:21:56 UTC
Hi Owen,

Reproducible with:
Win7x64 Ultimate
Version 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539)
No matter changing the options in Menu/Tools/Options/LibreOffice calc/Formula/Recalculation on load file,
neither with a manual link update even a hard recalc.

Works fine with:
Versión 3.6.6.1 (ID de compilación: a61ad19)
Comment 3 Commit Notification 2013-05-27 20:06:13 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

restore old behavior for external references, fdo#64229



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 2013-05-27 20:14:07 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=056b1bda58e4c550a1f42f92f0a93a4279aec9ad&h=libreoffice-4-1

restore old behavior for external references, fdo#64229


It will be available in LibreOffice 4.1.

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 2013-05-28 09:47:18 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

restore old behavior for external references, fdo#64229


It will be available in LibreOffice 4.0.4.

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.