Bug 57989 - EDITING: Writer TABLE does not update sum when adding or deleting row
Summary: EDITING: Writer TABLE does not update sum when adding or deleting row
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: highest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 57991 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-07 16:38 UTC by Fco
Modified: 2016-11-11 09:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
It is a simple table to show you the problem I mentioned before (29.50 KB, application/octet-stream)
2012-12-07 16:38 UTC, Fco
Details
sample file (10.45 KB, application/vnd.oasis.opendocument.text)
2012-12-08 20:58 UTC, Emir Sarı
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fco 2012-12-07 16:38:37 UTC
Created attachment 71139 [details]
It is a simple table to show you the problem I mentioned before

Hallo,

It is the first time I am using LO (Writer) and I really start loving this programme. Unfortunately I have a critical problem.

When I make a Table with Writer everything looks really nice and easy. But there is a real critical  bug: If  I cancel or add a new LINE the cells loose their formate. The table corrupts and does not any more sum the amounts correctly. In fact the total sum does not change anymore.

Once again: the table corrupts when i add or cancel one or several lines.

I thank you very much in advance for your kind help and soonest possible answer.

Best Regards
Franz
Comment 1 Emir Sarı 2012-12-08 02:47:13 UTC
@Fco

I cannot read the attachment, it looks like an Outlook .msg file, could you please attach a sample .odt file containing a table?

And meanwhile I've created a simple table, inserted values, inserted a SUM formula and then inserted several rows. The total sum remained the same, and when I entered new values to the new cells, formula updated itself immediately. (LO 4.0.0.0 alpha1 28/11 build - OS X 10.7.5)

Also that would be great if you could specify which LO version and locale you use. 

Thanks in advance.
Comment 2 Emir Sarı 2012-12-08 02:49:10 UTC
*** Bug 57991 has been marked as a duplicate of this bug. ***
Comment 3 Emir Sarı 2012-12-08 20:58:13 UTC
Created attachment 71219 [details]
sample file

Francisco sent this file to me via e-mail, now I am attaching it. 

Formula seems here not updating, but when I re-calculated the sum, then added another row, and made another multiplication, it seems the formula updated itself correctly. 

Can someone else check the file and play with it a bit?

Regards,
Comment 4 Roman Eisele 2012-12-15 10:15:29 UTC
@ Fco/Franz:
> It is the first time I am using LO (Writer) and I really start loving this
> programme. Unfortunately I have a critical problem.

Which version of LibreOffice do you use? To see the exact version,
please start LibreOffice and select “About LibreOffice” (“Über LibreOffice”) from the menu “LibreOffice”; or just locate LibreOffice in the Finder and press Command+I to get the Finder’s information window for the LibreOffice application ...

[Greetings from Brackenheim, not far from Heilbronn ;-)]
Comment 5 Roman Eisele 2012-12-16 20:35:18 UTC
Set “Version” field according to private mail by reporter -- for him reproducible since 3.6.2, but also in 3.6.4 and 4.0.0, and both on Mac OS X and Windows.

Improved Summary a bit.

> Can someone else check the file and play with it a bit?
I will try to do so soon ...
Comment 6 Roman Eisele 2012-12-23 20:49:38 UTC
> > Can someone else check the file and play with it a bit?
> I will try to do so soon ...

Sorry, I did not find any time to test this issue before Xmas.
I hope I will get some time in the coming weeks.
Comment 7 Roman Eisele 2012-12-24 11:04:14 UTC
OK, here is a first result of playing around with the sample file: something is definitely wrong with the re-calculation/update of the summmary field.

I can get it to work by entering the summary formula again, but then again it fails to update
* when I change the counts in column D
* when I delete a row
In both cases I need to enter the formula again -- i.e., select the cell with the main summary, click into the formula input field at the top of the window, and press enter/OK; then the formula updates.

Additionally, when I add another row to the formula, I can get into a state where the tooltip for the formula field still says:
  =sum(<F1>|<F2>|<F3>|<F4>|<F5>|<F6>|<F7>|<F8>|<F9>|<F10>|<F11>),
and the field still displays this value (e.g., "315,00"), but the formula input field at the top of the window displays as formula just says
  =sum(<F12>)

So there is definitely something “out of sync” here. Therefore I set the status of this bug report to NEW.

However, before we talk about this bug to the developers, it would be better to do additional tests, which
(a) make the steps given above reproducible step by step (I have just “played
    around” with the file, therefore I can not yet say if this behaviour
    is 100% reproducible),
(b) ideally, re-create the same problem in an even simpler file with
    instructions how to reprodoce the issue step by step, beginning
    with an empty Writer document.

I will try to do these additional tests and to report the results in the step-by-step format preferred by the developers in the next days/weeks.
Comment 8 Roman Eisele 2012-12-24 11:05:27 UTC
Supplement: I did my tests with LibreOffice 3.6.4.3 (Build ID: 2ef5aff) on Mac OS X 10.6.8 (Intel). When I do my more detailed tests, I will check if the same applies to LibO 4.0.0.0, too.
Comment 9 Jean-Baptiste Faure 2013-03-12 21:07:07 UTC
Reproducible for me under Ubuntu 12.04 x86-65 with all LibreOffice version since 3.5.7. 

Best regards. JBF
Comment 10 Siegfried 2013-03-13 14:21:05 UTC
i think same problem here with Writer Version 4.0.1.2. under Win 7 pro 64bit:

In Writer i have a calculation within a table (for ex. 4 columns), say <C3>*500. The result should display in <D3>. When i update the cell <C3> and move the cursor to cell <D3>, i would expect, that the result updates. 

Instead nothing happens, untill i hit F2 when the cursor is in cell <D3> to show up the formula editor (where i can see the formular "<C3>*500") and then press enter. Pretty annoying.
Comment 11 Gordo 2015-02-24 13:20:47 UTC
I think this belongs here instead of opening a new bug.

Insert Row Example:
1. New Text Document
2. Insert table 2x3
3. Type the value "10" in cell B1
4. Type the value "20" in cell B2
5. Insert sum formula in cell B3 by clicking on sum button
6. Select cells B1 and B2--result should be =sum<B1:B2>--and hit return.  Value in cell B3 is "30"
7. Right click on cell B3 and select Row, Insert and Ok default value of 1 and Before
8. Formula in B4 still says =sum<B1:B2> instead of =sum<B1:B3>
9. Type the value "5" in cell B3
10. Formula in B4 still says =sum<B1:B2> and the value is still "30"
Alternative 7. Right click on cell B2 and select Row, Insert and Ok default value of 1 and Before
8. Formula in B4 updates to =sum<B1:B3>
9. Type the value "5" in cell B2 and click anywhere else
10. Value in B4 updates to "35"


Delete Row Example:
1. New Text Document
2. Insert table 2x4
3. Type the value "10" in cell B1
4. Type the value "20" in cell B2
5. Type the value "5" in cell B3
5. Insert sum formula in cell B4 by clicking on sum button
6. Select cells B1 through B3--result should be =sum<B1:B3>--and hit return.  Value in cell B4 is "35"
7. Right click on cell B3 and select Row, Delete
8. Value in B3 now says ** Expression is faulty ** and the formula says =sum<B1:?>
Alternative 7. Right click on cell B2 and select Row, Delete
8. Value and formula in B3 updates correctly

These appear to be boundary issues.  The formulas do not update when a row is inserted or deleted at the beginning or the end.  I did a quick test and the same is true for inserting and deleting columns.

This was done in 4.4.0.3.
Comment 12 Travis 2015-05-16 00:20:57 UTC
Still exists in 4.4.3.2.  

Maybe a simpler use-case:


1) Create this table

| 1 |
-----
| 1 |
-----
| X |

where X = sum(<A1:A2>).


2) Right-click A2


3a)  Row > Insert > After

OR

3b)  Row > Delete


-- Expected Behaviour --
3a) X = sum(<A1:A3>).
3b) X = sum(<A1:A1>).

-- Actual Behaviour --
3a) X is unchanged.
3b) X = ** Expression is faulty **
Comment 13 Michael Stahl (allotropia) 2015-10-20 12:13:34 UTC
can reproduce comment #11 with OOo 3.3
Comment 14 QA Administrators 2016-11-08 11:37:27 UTC Comment hidden (obsolete)
Comment 15 Jean-Baptiste Faure 2016-11-11 09:01:36 UTC
Not reproducible anymore in LO 5.2.3 and current master built at home under Ubuntu 16.10 x86-64.

Closing as WorksForMe. Please, feel free to reopen if you disagree.

Best regards. JBF