Bug 158054 - Pivot tables messed up, deactivated by a sheet deletion
Summary: Pivot tables messed up, deactivated by a sheet deletion
Status: VERIFIED DUPLICATE of bug 158223
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: x86-64 (AMD64) All
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Pivot-Table Sheet
  Show dependency treegraph
 
Reported: 2023-11-03 12:21 UTC by Luca A.
Modified: 2023-12-08 12:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simplified worksheet containing corrupted pivot tables (57.86 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-11-03 14:07 UTC, Luca A.
Details
smaller sample ODS for comment 6 steps (68.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-11-23 08:04 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca A. 2023-11-03 12:21:57 UTC
Description:
I have a LibreOffice Calc spreadsheet with all my expenses. There is a pivot table for each month. Recently, whem I update pivot tables, the most recent ones appear mixed up. For example, the November table shows November and October data together, in different lines, and so on.
I really don't understand what is happening and why.
Thank you for your kind attention.

Steps to Reproduce:
1. Add new data (new expenses) to the main ("base") sheet
2. Update pivot tables
3.

Actual Results:
Mixed data appear in more recent monthly pivot tables.

Expected Results:
Monthly data are orderly shown in each line of pivot table.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded
Comment 1 m_a_riosv 2023-11-03 12:39:57 UTC
Without a sample file, there is no way to know what is happening.
Please attach a sample file.
Comment 2 Luca A. 2023-11-03 14:07:58 UTC
Created attachment 190633 [details]
Simplified worksheet containing corrupted pivot tables

After updating:
- pivot tables 'Giu23' and 'Ott23' contain double total lines;
- 'Lug23', 'Set23' and 'Nov' pivot tables are no longer pivot tables and show data that were previously removed from thw 'BASE' sheet.
I really cannot understand what happened.
Thank you!
Comment 3 m_a_riosv 2023-11-03 16:09:28 UTC
In Oct23, looks there are two pt in the same place, that's no easy to select only, right-click and delete, right-click and refresh, now looks only one is there.

How they end in other duplicate, and is lost in other, I'm not able to explain. But usually involuntary changes provoke them.

Let's see if someone else, is able to confirm that is really a bug, and why it happens.
Comment 4 Stéphane Guillou (stragu) 2023-11-22 21:15:16 UTC
Luca, are you able to provide steps that trigger the issue?
I can see the end result in the attached file, but I don't know how to reproduce such mangling of pivot tables.
Comment 5 Luca A. 2023-11-22 21:56:44 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> Luca, are you able to provide steps that trigger the issue?
> I can see the end result in the attached file, but I don't know how to
> reproduce such mangling of pivot tables.

Dear Stéphane,
first of all, thank you for your kind attention!
I turned back my LibrOffice version from 7.6 back to 7.5.
Then I erased and rebuilt the single pivot tables, that were not working everytime I tried to update them.
I don't know if the issue regards the latest version or something wrong in the pivot tables themselves (anyway, every time they were built by copying the previous one and modifying dates in the main filter, and that method had always worked for more than 24 months...).
The good news is that now these recent new tables work correctly as usual, so I cannot reproduce the issue.
THank you all again for the cooperation.
L.
Comment 6 Stéphane Guillou (stragu) 2023-11-23 08:04:27 UTC
Created attachment 190984 [details]
smaller sample ODS for comment 6 steps

(In reply to Luca A. from comment #5)
> first of all, thank you for your kind attention!
Thank you for reporting issues!
> I turned back my LibrOffice version from 7.6 back to 7.5.
> Then I erased and rebuilt the single pivot tables, that were not working
> everytime I tried to update them.
> [...]
> The good news is that now these recent new tables work correctly as usual,
> so I cannot reproduce the issue.
Glad you have a working version. Which 7.5 release is it exactly? In any case, this might mean that we have a regression in 7.6, which is important to identify if we can. I know of one sheet reference-related regression in 7.6: bug 158223.

The thing I could reproduce:
1. Open this attachment (based on yours)
2. Check that Pivot table in Ago23 does work
3. Delete Sheet3.
Result A: Even though buttons are still there, the pivot table is inactive, can't be refreshed or interacted with.
4. Save and reload.
Result B: the area is recognised as a pivot table (can use e.g. Edit or Refresh), but it has no effect.
5. Right-click > Refresh the pivot table;
6. Save and reload.
Result C: no more buttons; area is still recognised as a pivot table, still inactive.

Let's focus on this aspect of the issue, as we have reproduction steps (even though we don't have steps for the overlap of tables).

Reproduced in:

Version: 7.6.3.1 (X86_64) / LibreOffice Community
Build ID: c4af5b1259bceea6e979e6fe2435dbee7a5a87c2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Not reproduced with:

Version: 7.5.8.2 (X86_64) / LibreOffice Community
Build ID: f718d63693263970429a68f568db6046aaa9df01
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 7 Luca A. 2023-11-24 15:34:35 UTC
(In reply to Stéphane Guillou (stragu) from comment #6)
[...]
> (In reply to Luca A. from comment #5)
> > first of all, thank you for your kind attention!
> Thank you for reporting issues!
> > I turned back my LibrOffice version from 7.6 back to 7.5.
> > Then I erased and rebuilt the single pivot tables, that were not working
> > everytime I tried to update them.
> > [...]
> > The good news is that now these recent new tables work correctly as usual,
> > so I cannot reproduce the issue.
> Glad you have a working version. Which 7.5 release is it exactly? In any
> case, this might mean that we have a regression in 7.6, which is important
> to identify if we can. I know of one sheet reference-related regression in
> 7.6: bug 158223.

My version info is as follows:

Version: 7.5.8.2 (X86_64) / LibreOffice Community
Build ID: f718d63693263970429a68f568db6046aaa9df01
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

> [...]

Thank you again!
L.
Comment 8 Stéphane Guillou (stragu) 2023-11-27 14:46:10 UTC
Confirmed with linux-64-7.6 bibisect repo that it started at build commit [880b3d5c4c648d350e8bb95b5bfbd0382efb5331] which points to core commit 04098a535bf25494379678b9539c4987cb33431f which is a cherrypick of:

commit 94ca402cd1fe2fd9776d08448f7216b7f638e69a
author	Tünde Tóth 	Tue Jul 18 15:20:47 2023 +0200
committer	László Németh 	Tue Jul 25 15:04:01 2023 +0200
tdf#156174 sc DBData: fix regression of database ranges
Regression from commit 0c0444c44107f1a18f23dd0833d462d8dbf56569
"tdf#126926 sc DBData: delete the database range".
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154582

Tünde, can you please have a look? Tempted to keep both reports open as this one is about Pivot Tables and the other about Chart data ranges, but please feel free to mark as duplicate.
Comment 9 Xisco Faulí 2023-12-05 12:29:02 UTC
I think this can be closed a dupe of bug 158223

*** This bug has been marked as a duplicate of bug 158223 ***
Comment 10 Stéphane Guillou (stragu) 2023-12-08 12:25:23 UTC
I verified that the fix for bug 158223 did fix the comment 6 issue too.
The fix is in a current master, and will be available in the 7.6.5 release.

Luca, if you still experience the issue of mixed up tables, with clearer steps to reproduce, please open a new report.
Thank you!