| Summary: | External reference not supported as result in the THEN or ELSE paths of an IF jump | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | marcusman <marcus> |
| Component: | Calc | Assignee: | Eike Rathke <erack> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | erack, himajin100000, miguelangelrv, winfrieddonkers, xiscofauli |
| Priority: | medium | ||
| Version: | 4.1 all versions | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:6.2.0 target:6.1.0.2 target:6.0.6 target:7.1.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: |
simple testcase - first (main) .ods file
simple testcase - second (external) .ods file 1st screenshot (1 of 4) 2nd screenshot (2 of 4) 3rd screenshot (3 of 4) 4th screenshot (4 of 4) Sample showing the issue on the IF function |
||
|
Description
marcusman
2018-07-05 20:08:24 UTC
Created attachment 143330 [details]
simple testcase - first (main) .ods file
Created attachment 143331 [details]
simple testcase - second (external) .ods file
Created attachment 143332 [details]
1st screenshot (1 of 4)
Created attachment 143333 [details]
2nd screenshot (2 of 4)
Created attachment 143334 [details]
3rd screenshot (3 of 4)
Created attachment 143336 [details]
4th screenshot (4 of 4)
Created attachment 143337 [details]
Sample showing the issue on the IF function
issue with array to external file for the IF function on THEN or OTHERWISE
(Using the same linked file)
Version: 6.2.0.0.alpha0+ Build ID: 67c88e284af74c88e37cc8f66cdfc0e346de45ac CPU threads: 4; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86@42, Branch:master, Time: 2018-06-19_23:41:55 Locale: es-ES (es_ES); Calc: CL Reproduced back to Version: 4.1.0.0.alpha0+ Build ID: 64dafbe584fe7644ec29b96b6a9a9588ba4619b @Eike, @Winfried, I thought you could be interested in this issue... This boils down to an external reference not being supported in the THEN or ELSE paths of an IF jump if in array/matrix mode. Short reproducer:
=IF('problem_2_external_file.ods'#$external_data.B$1:B$9=B14,'problem_2_external_file.ods'#$external_data.C$1:C$9)
entered in any cell of problem_2_main_file.ods as array formula (closed with Shift+Ctrl+Enter) for the preselected fruits case in B14 displays the first 5 values as Err:502 (which should be the matching 5 fruits) followed by 4 values FALSE (as there are no more matches for fruits in the range).
Taking.
A workaround is to not have the external reference be the final IF result, introducing an operation such as concatenating with an empty string (...&"") in this case helps:
=IF('problem_2_external_file.ods'#$external_data.B$1:B$9=B14,'problem_2_external_file.ods'#$external_data.C$1:C$9&"")
(In reply to Eike Rathke from comment #11) > A workaround is to not have the external reference be the final IF result, > introducing an operation such as concatenating with an empty string (...&"") > in this case helps: > > =IF('problem_2_external_file.ods'#$external_data.B$1:B$9=B14, > 'problem_2_external_file.ods'#$external_data.C$1:C$9&"") Confirmed, the workaround works for me. Thanks for the idea! :-) Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a5b9bb7be70c7aec2388199e68a0cf86dd220955 Resolves: tdf#118561 handle external references as jump matrix result It will be available in 6.2.0. 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. Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=57e908136f4b7135e6c4a35a81e45c47f9f1b548&h=libreoffice-6-1 Resolves: tdf#118561 handle external references as jump matrix result It will be available in 6.1.0.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. Pending review for 6-0 https://gerrit.libreoffice.org/57148 Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f3515b5e54dabb08ddb01253d9503e9c16cfebe&h=libreoffice-6-0 Resolves: tdf#118561 handle external references as jump matrix result It will be available in 6.0.6. 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. Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a36455c8d1aba28ca593a90f2957078934ea5700 tdf#118561: sc_subsequent_filters_test: Add unittest It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |