Bug 136537 - Cell formulas get corrupted with Drag & Drop
Summary: Cell formulas get corrupted with Drag & Drop
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2020-09-07 08:17 UTC by vsoler
Modified: 2020-10-02 11:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
the file for testing (7.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-09-12 21:08 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vsoler 2020-09-07 08:17:18 UTC
Description:
When a number of cells and moved, their formulas get corrupted.

please follow this simple example:

A1: one
A2: two
A3: total:
B1: 1
B2: 2
B3: SUM(B1:B2)

cell B3 contains 3, which is the sum of 1+2.

Now, select cells A2 to B3, and drag them down by 1 row -> the selection is now A3 to B4

However, the total, which should be 3, has becomed 1 (wrong!) because the formula still is SUM(B1:B2) whereas it should be SUM(B1:B3)

I consider this to be a significant error. Could you please check it and amend it?

Thank you very much for your cooperation

Actual Results:
1

Expected Results:
3


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: es
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Version 6.4.4.2
Comment 1 BogdanB 2020-09-12 21:07:18 UTC
I don't consider this to be a bug.
If I specify that I want the sum from B1 to B2, than that cell from B3 is doing exactly what I wanted: sum from B1 to B2. In this case it have just a single number which is 1, and this is correct.

But we can take a second opinion from the design team.
Comment 2 BogdanB 2020-09-12 21:08:29 UTC
Created attachment 165432 [details]
the file for testing
Comment 3 Oliver Brinzing 2020-09-13 15:11:22 UTC
(In reply to BogdanB from comment #1)
 
> But we can take a second opinion from the design team.

btw: Excel 2016 will extend the formula to =SUM(B1:B3)
Comment 4 BogdanB 2020-09-13 15:20:33 UTC
Oliver, in this case, we can consider an enhancement?
Comment 5 Oliver Brinzing 2020-09-14 05:14:30 UTC
(In reply to BogdanB from comment #4)
> Oliver, in this case, we can consider an enhancement?

i think so

bwt: cut & paste behaves the same way
Comment 6 Thomas Lendo 2020-10-01 20:04:49 UTC
This enhancement request is valid for me. In the steps of comment 0 I would suppose that the formula will be smart and that it changes together with the user action. It's the same when I insert a row between row 1 and 2: the total value extends from SUM(B1:B2) to SUM(B1:B3) automatically. So when a formula is moved by drag & drop it also should adopt itself.

The question to UX and the developers is, how far can we go and how smart can it be done.
Comment 7 Heiko Tietze 2020-10-02 11:20:31 UTC
The expected behavior is effective if you add a row within the range or when Tools > Options > Calc > General > Input Settings "Expand references when new columns/rows are inserted" is enabled, see [1]. 
The other workflow, moving a selection, is not supported for good reasons. While the first changes the whole sheet with the purpose of adding data the latter is just to change the visualization. You drag the formula result to a more prominent place, for example. Imagine to move not just a few rows down but some columns to the right - would be surprising if the calculation changes completely.
And last but not least this is exactly how MS Excel behaves. Moving a section never changes the formula while adding a row does. => WF

[1] file:///usr/lib/libreoffice/help/en-US/text/shared/optionen/01060300.html?System=UNIX&DbPAR=CALC&HID=modules/scalc/ui/scgeneralpage/ScGeneralPage#bm_id3147211