Download it now!
Bug 53640 - PIVOTTABLE from Datasource (Base, Query) shows wrong results
Summary: PIVOTTABLE from Datasource (Base, Query) shows wrong results
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: high major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.7.0 target:3.6.2
Keywords: regression
: 53656 (view as bug list)
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-08-17 10:33 UTC by rado.tsvetkov
Modified: 2013-12-12 15:37 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (348.75 KB, image/jpeg)
2012-08-17 10:33 UTC, rado.tsvetkov
Details
Used Databese and Speadsheet (103.95 KB, application/zip)
2012-08-17 10:39 UTC, rado.tsvetkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rado.tsvetkov 2012-08-17 10:33:13 UTC
Created attachment 65688 [details]
Screenshot

Problem: Making a Pivot Table from Datasource Query gives wrong result. BUT using the _same_ data_ from the spreadsheet works correclly.

How to reproduce:
1. Use Datasource from Base Query or use the rpovided file and Query 2012-Analysis-Query"
2. Make the Pivot Table using that query with Columns "Month", Row  "Activity" and Data field "Time"
3. Import the same data to a spreadsheet, select and make the same Pivot Table.

the results are different and the Pivot TAble from the Data source is wrong!

See the attached screenshot for all details!
Comment 1 rado.tsvetkov 2012-08-17 10:39:36 UTC
Created attachment 65689 [details]
Used Databese and Speadsheet

PLS register the Datasource in the office before refreshing the range!
Comment 2 rado.tsvetkov 2012-08-17 11:58:36 UTC
This bug is not existent in

LibreOffice 3.4.6  OOO340m1 (Build:602) 
Debian squeeze
Comment 3 Alex Thurgood 2012-08-21 14:27:36 UTC
*** Bug 53656 has been marked as a duplicate of this bug. ***
Comment 4 Alex Thurgood 2012-08-21 14:29:23 UTC
@Lionel : your area if its a DB filter problem, or Kohei's or Markus' for Calc ?



Alex
Comment 5 Kohei Yoshida 2012-08-21 14:40:23 UTC
As an aside, I hope people stop over-using ! at the end of sentences.  I interpret that to be yelling, and I prefer not to be yelled at.
Comment 6 Alex Thurgood 2012-08-21 14:44:44 UTC
Also confirmed on :

Version 3.7.0.0.alpha0+ (Build ID: 9e04ae0)

master build from 21/08


Alex
Comment 7 Lionel Elie Mamane 2012-08-21 14:50:28 UTC
(In reply to comment #4)
> @Lionel : your area if its a DB filter problem, or Kohei's or Markus' for Calc

I can easily believe it is my area, but I am completely swamped. It would be helpful if "somebody else" took care of it, or at least pointed me at the exact problem within connectivity and/or dbaccess modules.

I'm available for "technical support" concerning database stuff.
Comment 8 Lionel Elie Mamane 2012-08-21 14:51:10 UTC
(In reply to comment #7)
> I'm available for "technical support" concerning database stuff.

I meant "technical support to the person handling / fixing this bug", obviously.
Comment 9 Kohei Yoshida 2012-08-21 18:11:15 UTC
I'll take a look, and give it back to you if the problem is not on the calc side.
Comment 10 Rainer Bielefeld Retired 2012-08-22 14:59:04 UTC
Already broken with 
- Server Installation of  "LibreOffice 3.6.0beta1  German UI/Locale [Build-ID: 1f1cdd8] on German WIN7 Home Premium (64bit) 

Data still was correct with
- Server installation of  Master "LOdev 3.6.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 475d0c5-829fc92-39746e8-206648e-fefd87]" (2012-02-14)
Comment 11 Kohei Yoshida 2012-08-22 18:16:42 UTC
Aha!  Turns out that this was a simple human error on the calc side.

I'll fix it soon.
Comment 12 Not Assigned 2012-08-22 19:02:28 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#53640: Correctly cache source data coming from database backend.
Comment 13 Kohei Yoshida 2012-08-22 19:07:29 UTC
Sorry Rainer.  I accidentally reverted your change.
Comment 14 Not Assigned 2012-08-22 19:25:09 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a28d9cad672739cbf8dc6cf1f9db7d0f8becfee1&g=libreoffice-3-6

fdo#53640: Correctly cache source data coming from database backend.


It will be available in LibreOffice 3.6.2.
Comment 15 Kohei Yoshida 2012-08-23 00:28:27 UTC
I call this fixed.
Comment 16 tim 2012-08-23 07:32:49 UTC
I'd just like to say that as an ordinary user I'm most impressed by the speed with which this has been investigated & fixed.  Thanks to all involved.  I look forward to getting 3.6.2 in October.

This is as good a demonstration of the justification for my (and hopefully many others) recent move away from Windows and MS Office as I could wish for.
Comment 17 Michael Meeks 2012-08-23 08:34:06 UTC
Hi Tim,

> I'd just like to say that as an ordinary user I'm most impressed by the speed
> with which this has been investigated & fixed. Thanks to all involved.
> I look forward to getting 3.6.2 in October.

Thanks for your encouragement - it means a lot ! Having said that - it would really help to find these bugs earlier - have you considered testing pre-release builds ? eg.

    http://www.libreoffice.org/download/pre-releases/

Or - even better running direct from tinderbox builds of master:

    http://dev-builds.libreoffice.org/daily/

If you can find new regressions in those master builds that are not in the last release (and there are often some), it's fair-game to mail the developers directly at libreoffice@lists.freedesktop.org so we can tighten the cycle of bug creation to fixing, improve the final product, and build a relationship with the developers :-)

And thanks to Rado for a quick, clean bug report !
Comment 18 tim 2012-08-23 08:52:01 UTC
Unfortunately I am mostly limited to 1 PC for both using and testing libreoffice, so testing pre-release versions is not really practical since I need calc, base & writer to work reasonably well.

I am, however, prepared to move to new full release versions fairly early even if not 100% stable, as I did with 3.6, and then back off if I have to.  I'll move on as soon as is practical.

I reported this problem at 53656 shortly after this report was raised.  My report turned out to be a duplicate - I'm not sure how I missed this one.
Comment 19 rado.tsvetkov 2012-08-23 15:29:45 UTC
10x 
Great work cowboys :)
 I'll be happy to retest, but after a week of  holidays.
Comment 20 Not Assigned 2012-08-27 20:48:43 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-3-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ca2d95c8ee30c450483433d5f380ebbf80691d5&g=libreoffice-3-6-1

fdo#53640: Correctly cache source data coming from database backend.


It will be available already in LibreOffice 3.6.1.
Comment 21 tim 2012-08-29 13:08:22 UTC
Forgive me for asking, I am somewhat inexperienced in these matters with open software.

Is this fix in 3.6.1 as released on 29/8/12 or not? I see it is declared above as being in 3.6.1, but is it really?

I cannot see it in http://download.documentfoundation.org/libreoffice/src/bugfixes-libreoffice-3-6-1-release-3.6.1.2.log 

or 

http://www.mirrorservice.org/sites/download.documentfoundation.org/tdf/libreoffice/src/bugfixes-libreoffice-3-6-1-release-3.6.1.1.log 

I would like to try the fix, but it would take me several hours (and several opportunities for me to screw up) to download, install, test and revert to 3.5 if I have to.
Comment 22 Kohei Yoshida 2012-08-29 13:10:21 UTC
(In reply to comment #21)
> Forgive me for asking, I am somewhat inexperienced in these matters with open
> software.
> 
> Is this fix in 3.6.1 as released on 29/8/12 or not? I see it is declared above
> as being in 3.6.1, but is it really?

No it's not.  There's been some confusion between us devs and the release schedule, and it was committed to the 3.6.1 branch *after* the GA of 3.6.1 release.

It will be available in 3.6.2.
Comment 23 tim 2012-08-29 13:18:02 UTC
Thanks very much for your speedy response.
Comment 24 rado.tsvetkov 2012-09-10 09:45:55 UTC
Verified - fixed in 3.7.0 alpha 0 2012-09-09 12.46.31 daily build Win
Comment 25 Ferry Toth 2012-10-03 16:30:58 UTC
I just tested Kubuntu Quantal beta from virtualbox to find this bug present. 

This beta contains LibO 1:3.6.1~rc2-1ubuntu5 where I found the bug still present.

For us this bug has big implication, because we pull time/billing info from our database and use data pilot to group/format it to our invoices.

As this is so important to us (to earn money) this is always the first thing I test with a new version. It actually tests the whole chain of postgresql driver, base and calc data pilots.

Sadly this will block us from moving to Quantal soon, unless Quantal final releases with 3.6.2. Or backports the patch to 3.6.1.

Ferry
Comment 26 tim 2012-10-03 16:42:36 UTC
My understanding is that this is fixed in 3.6.2, due for final release this week.  I intend to test it for my own use on 12.04 as soon as it can be downloaded.  If you want to test a beta it is already available as 3.6.2 RC2.
Comment 27 Michael Meeks 2012-10-04 09:02:06 UTC
Ferry: it'd be great to test your fix in the pre-releases:

http://www.libreoffice.org/download/pre-releases/

or vs. master:

http://dev-builds.libreoffice.org/daily/

To verify the fix; though we release 3.6.2 today which should make things easier :-)
Comment 28 Ferry Toth 2012-10-04 16:21:30 UTC
Michael,

I'll be happy to test the fix in 3.6.2 rc, beta or final on windows.

I'm just afraid that Ubuntu Quantal will ship with 3.6.1 without the fix.

BTW it is not my fix, see comment #20.

Ferry
Comment 29 tim 2012-10-04 16:55:26 UTC
I have just run 3.6.2 on ubuntu 12.04.  The problem is fixed. Thanks to all.

Now I just have to find out how to make ubuntu/unity make the new version the default.
Comment 30 Ferry Toth 2012-10-05 13:06:03 UTC
Installed 3.6.2 dutch in Windows 7 and works for me.