Bug 72774 - PIVOTTABLE: Changing page field settings after load makes the table output empty.
Summary: PIVOTTABLE: Changing page field settings after load makes the table output em...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta2
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.1.5 target:4.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 04:18 UTC by Kohei Yoshida
Modified: 2014-01-19 15:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with recreated Pivot Tables (47.01 KB, application/xml)
2013-12-20 02:11 UTC, m_a_riosv
Details
File with different data source for Pivot Tables. (56.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-20 02:12 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Yoshida 2013-12-17 04:18:27 UTC
Open the file from Bug 66969.

https://bugs.freedesktop.org/attachment.cgi?id=90853

After the file is loaded, immediately change the settings of the "Project Name" page field. E.g. check APL-01-1, then click OK.

The table output becomes empty, but it shouldn't.

Refreshing the table again fixes it.
Comment 1 Kohei Yoshida 2013-12-17 04:18:40 UTC
Confirming.
Comment 2 m_a_riosv 2013-12-17 18:17:33 UTC
Confirmed:
Win7x64Ultimate
Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)
Version: 4.2.0.0.beta2+ Build ID: d663228bd348c844f38914c9e2167ef01fadf3b3
         TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2013-12-14_23:15:05

Sorry but I think there are more issues:
- Selecting the second item BFE-01-0, only show <01/01/2013 in Years/Months/Start date.
- Selecting the field filter for Years, show all natural number until the maximum year in the table, plus >27/04/2013. I think something similar in Months. Ungrouping dates and redoing the group seems solve the years issue.
- Right after open:
 - It is not possible to select in the field filter for any field.
 - It is not possible to enter en Menu/Data/Group
Comment 3 Kohei Yoshida 2013-12-17 19:40:31 UTC
(In reply to comment #2)
> Confirmed:
> Win7x64Ultimate
> Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)
> Version: 4.2.0.0.beta2+ Build ID: d663228bd348c844f38914c9e2167ef01fadf3b3
>          TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time:
> 2013-12-14_23:15:05
> 
> Sorry but I think there are more issues:
> - Selecting the second item BFE-01-0, only show <01/01/2013 in
> Years/Months/Start date.
> - Selecting the field filter for Years, show all natural number until the
> maximum year in the table, plus >27/04/2013.

Sure. But that's nothing new. If you test a very old version of even OOo, it shows the same problem.

 I think something similar in
> Months. 

Yes. All date group fields show the same issue. But as I said, that's nothing new, and it's unrelated to this bug herein.

Let's keep these separate issues as separate bug reports. Otherwise we'd never be able to close any pivot bugs.  Thanks.
Comment 4 Kohei Yoshida 2013-12-18 18:11:16 UTC
Ah, I think I mis-understood it.  It was not what I thought it was.  Sorry about that.

Either way, I won't have time to do bug fixes at least until toward the end of the month. Given that fixing bugs in pivot table is generally very time-consuming in general esp when it involves grouped date fields, it'll be probably until next year before I can sit down and look at the remaining issues.

I really need more help fixing pivot bugs...
Comment 5 m_a_riosv 2013-12-20 02:10:32 UTC
After a lot of trials, trying to identify a common point for the issue.

1- Opening and right-click refresh from any cell in PT shows the empty table.
2- Opening and save without any change, and opening again the issue is there sometimes.
3- Selecting APL-01-1, saving and reopening the issue is there sometimes.
4- After 2, deleting second sheet, saving and reopening, I can not reproduce the issue (only one grouped PT).

Deleting two PT, and recreating them on the same destination sheet.ranges and a new one in a new sheet equal the second PT with group (first attachement), result with a strange behaviour.
Opening the file, it is in the last sheet, go to the second sheet and refresh.
Return to the last sheet, the PT has been updated, showing data without filter, and moves the visualization of PT one row down.
Clicking on the First filter plus OK, the PT come back to their right position, but discarded data aren't deleted.
After refresh the PT change again their position.

Deleting the sheets with PT recreating again the PTs the issue persist, but resting only with the PT grouped no issue.

Copying the Sheet with data to a new one, and assigning it to the PT grouped, I can not reproduce the issue (second attachment).

Seems like if there are some interrelation between PTs with common data source range.
Comment 6 m_a_riosv 2013-12-20 02:11:31 UTC
Created attachment 91012 [details]
File with recreated Pivot Tables
Comment 7 m_a_riosv 2013-12-20 02:12:19 UTC
Created attachment 91013 [details]
File with different data source for Pivot Tables.
Comment 8 Commit Notification 2014-01-07 21:39:43 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#72774: Ensure that all the group fields are in cache upon file load.



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 9 Commit Notification 2014-01-07 21:39:58 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#72774: Add test for group field cache population on file load.



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 10 Kohei Yoshida 2014-01-07 21:43:17 UTC
I just fixed the original issue in Comment 1. This bug report is becoming a mixture of various issues. It would be great to separate some of them as different bug reports.
Comment 11 Kohei Yoshida 2014-01-08 03:14:18 UTC
Never mind, I think I fixed the one in Comment 2 as well...
Comment 12 Kohei Yoshida 2014-01-08 04:08:01 UTC
Backport request for 4.2: https://gerrit.libreoffice.org/7305
Backport request for 4.1: https://gerrit.libreoffice.org/7306
Comment 13 Kohei Yoshida 2014-01-08 04:09:46 UTC
https://gerrit.libreoffice.org/7302
https://gerrit.libreoffice.org/7301

These are also backport requests for 4.2 and 4.1 for the earlier fix.

Meanwhile, I'll mark this fixed.
Comment 14 Commit Notification 2014-01-08 12:58:54 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

fdo#72774: Ensure that all the group fields are in cache upon file load.


It will be available in LibreOffice 4.1.5.

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 15 Commit Notification 2014-01-08 13:07:20 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

fdo#72774: Generate correct group items for the year group.


It will be available in LibreOffice 4.1.5.

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 16 Commit Notification 2014-01-08 13:30:16 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=06a5bad8e1feb1972059d4f9c4d89eb59ae43ae2&h=libreoffice-4-2

fdo#72774: Generate correct group items for the year group.


It will be available in LibreOffice 4.2.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 17 Commit Notification 2014-01-08 13:31:35 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=9b0c7cd38c565e7fcdd0b426391749a59d57038f&h=libreoffice-4-2

fdo#72774: Ensure that all the group fields are in cache upon file load.


It will be available in LibreOffice 4.2.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 18 m_a_riosv 2014-01-19 15:51:00 UTC
Thanks Kohei.
Sorry for the delay in check.

Seems solved.
Win7x64Ultimate
Version: 4.1.6.0.0+ Build ID: 80df333af59124d484f7d87d83ba0acaef003eb
Version: 4.2.0.2 Build ID: cd65d6220c5694ee7012d7863bcde3455c9e3c30
Version: 4.2.1.0.0+ Build ID: d72321b665f54946cf603e6f30740f31151c898f
         TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-01-16_02:01:06
Version: 4.3.0.0.alpha0+ Build ID: 42f551d524a1df46f6a311d5897ac30bd8fc1aaf
         TinderBox: Win-x86@39, Branch:master, Time: 2014-01-15_22:44:37