Description: Incorrect result to a textjoin function where one cell is calculated from another. Steps to Reproduce: Create a spreadsheet where... cell A1 contains A cell A2 contains formula =B2 cell B2 is empty cell A3 contains C cell A4 contains =TEXTJOIN("-",1,A1:A3) Actual Results: The result shown in A4 is "A-A-C" Expected Results: It should be "A-C" Reproducible: Always User Profile Reset: No Additional Info: Give the correct result
Reproducible on Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: c82aa206ab496248dd107c41ff5f66ec5a2399ac CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3 Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.3-CN Calc: threaded Set status to NEW.
"A-A-C" is of course wrong, but A2 is not empty (and displays 0) so I'd guess the result should be "A-0-C" instead. Or what does Excel do?
(In reply to Eike Rathke from comment #2) > "A-A-C" is of course wrong, but A2 is not empty (and displays 0) so I'd > guess the result should be "A-0-C" instead. > Or what does Excel do? NISZ Team, do you have Office 2019 to test it ?
Quite right that A2 would contain 0 - though for me it did not as I had 0s being hidden. Off the topic/bug report but should a reference to an empty cell show 0?
Google Sheets returns A-C
(In reply to Bob Garrett from comment #4) > Off the topic/bug report but should a reference to an empty cell show 0? Yes. That's what all major spreadsheet implementations do. And the main reason why that display zero values option exists.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f4f2c94513e7d06691a73d9f12707c33d131d537 Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty It will be available in 7.3.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.
Pending review https://gerrit.libreoffice.org/c/core/+/123864 for 7-2 https://gerrit.libreoffice.org/c/core/+/123865 for 7-1 https://gerrit.libreoffice.org/c/core/+/123866 for 7-1-7
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/56d750a5c0f857aedf036f0cd49cfad2de9238ae tdf#145235: sc_text_functions_test: Add unittest It will be available in 7.3.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/fb2b0e1836431f9c16d7125dfd3f596436899134 Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty It will be available in 7.2.3. 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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-1": https://git.libreoffice.org/core/commit/045b1137b855b59c166212dcad10dce9c067dd00 Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty It will be available in 7.1.8. 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.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/45f53338461ba61c53c51a04f99fa281bf5150ae Related: tdf#145235 TEXTJOIN() allow empty delimiter of referenced empty It will be available in 7.3.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4a8184ce0cc59e4e223cf963141c16644b762440 tdf#145235: sc_text_functions_test: Add unittest for empty delimiter It will be available in 7.3.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.
Verified in Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: ea65215855462e5e48f7a3a78724c38b5fc0e4d1 CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Eike, thanks for fixing this issue!!
I checked this bug, and indeed is solved when inserting the formula again, but if I save the document with an older version (which shows A-A-C) and reopen the document with 7.3 master (latest version) it is the same A-A-C. Only if I remove the formula and insert again it is correct, OR if I use Recalcule Hard (Shift + Control +F9).
It has to be, because unless recalculated the result stored in file is displayed. Either hard, or via changed dependencies, or triggered by volatile functions in the expression or its dependencies.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-1-7": https://git.libreoffice.org/core/commit/989eb3461bd4ba8716da2c62386e4f044731ff16 Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty It will be available in 7.1.7. 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.