Bug 92419 - delete referenced cell - raise error to warn (inexperienced) users
Summary: delete referenced cell - raise error to warn (inexperienced) users
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:
: 148319 (view as bug list)
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2015-06-29 09:44 UTC by Ferdinand
Modified: 2024-05-01 13:22 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
warning overriding cells with content (20.19 KB, image/png)
2019-09-14 17:46 UTC, Ferdinand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand 2015-06-29 09:44:05 UTC
if a referenced cell is deleted (delete row/column) the referencing cells show #REF
if this cell is on a different table or out of view it will not be recognized by the user IN TIME !

IMO deleting a referenced cell should raise a popup 
"Warning - referenced cell will be deleted - Continue yes/no"
"show referencing cells yes/no"

this is a major usability issue
Comment 1 Buovjaga 2015-07-02 11:51:22 UTC
UX plz help.
Comment 2 Ferdinand 2015-12-27 11:47:09 UTC Comment hidden (no-value)
Comment 3 Robinson Tryon (qubit) 2016-08-25 05:39:15 UTC Comment hidden (obsolete)
Comment 4 Ferdinand 2016-09-19 18:58:26 UTC
unfortunately still not fixed in 5.2.1.2
Comment 5 Ferdinand 2016-12-07 20:04:02 UTC Comment hidden (off-topic)
Comment 6 V Stuart Foote 2016-12-07 20:26:15 UTC
@Eike, Kohei any opinion on this?

Would it be a legitimate alert to warn users of potential for data loss?

And would implementing something like this be too much of a nag if always enabled, better to just provide as an configurable alert? And pick a default.

Probably no interest as a 5.3 late feature, but seems to have merit for 5.4.
Comment 7 Buovjaga 2016-12-07 20:26:34 UTC Comment hidden (off-topic)
Comment 8 Ferdinand 2016-12-07 20:44:05 UTC Comment hidden (no-value)
Comment 9 m_a_riosv 2016-12-07 22:56:01 UTC
A non optional alert would be unacceptable work break.

To not create a new option, could be associated with Menu/Tools/Options/LibreOffice calc/General - Show overwrite warning when pasting data.
Comment 10 Ferdinand 2016-12-07 23:51:59 UTC
pls look at the package manager
you can not delete a package with depending packages. 
you must "force" it and THEN it's your responsibility if you get an inconsistent state.
Comment 11 V Stuart Foote 2016-12-08 00:04:31 UTC
(In reply to Ferdinand from comment #10)
One issue per bug, please.
Comment 12 V Stuart Foote 2016-12-08 00:18:50 UTC
(In reply to m.a.riosv from comment #9)
>...

> To not create a new option, could be associated with
> Menu/Tools/Options/LibreOffice calc/General - Show overwrite warning when
> pasting data.

Not sure that checkbox would link the right behavior. The overwrite warning there is:

"You are pasting data into cells that already contain data. Do you really want to overwrite the existing data."

But here we are deleting cell(s) that have referenced linkages--and should be aware of what happens to values in those referenced cells?  Warning should probably be an alert that action would delete cell(s) with active reference(s).
Comment 13 m_a_riosv 2016-12-08 01:08:16 UTC
Sure, but I hope text can be modified to explain what it's affected by the option.

I'm only think how to avoid a new option, because without an option to disable remark for this matter, for me it would be absolutely unacceptable.
Comment 14 Ferdinand 2017-06-19 23:01:26 UTC Comment hidden (no-value)
Comment 15 Eike Rathke 2017-06-20 19:51:46 UTC
As this is not set to resolved fix it is not implemented, no.

First, we certainly do not want to scan the entire document (or broadcast and collect a new before-deletion hint) whether a formula expression references a to be deleted cell or not for each cell/column/row to be deleted. Second, an expression could also reference a cell/range not only in cell formulas but also in named expressions, validation, conditional formatting, ...  We could significantly slow things down with such an approach, so anything like that should be optional not activated by default, which then again doesn't help an inexperienced user either. Plus, implementation would be cumbersome.

In short, I'm not a friend of this.
Comment 16 Ferdinand 2017-06-20 20:54:15 UTC
Sorry I do not understand this reasoning in comment 15

the referenced cell shows the error immediately (given automatic calc is on) 

if in addition to the error in the cell a pop up is triggered with the undo option it would solve the problem without noticeable delay. 

just my 2c
Comment 17 Buovjaga 2017-06-21 04:14:30 UTC
(In reply to Ferdinand from comment #16) 
> if in addition to the error in the cell a pop up is triggered with the undo
> option it would solve the problem without noticeable delay. 

Ok, I think you just moved the goalposts in such a way that this could now be the job of your own special extension. Eike, do you agree? Then we could close this and Ferdinand can find someone to develop such an extension for him.
Comment 18 Ferdinand 2017-06-21 18:16:50 UTC
Sorry guys,

I am a (python, sql) developer myself and I am aware of the danger of deleting referenced cells - a widely missing feature in all spreadsheets I know.

The problems hits less experienced users who should be protected against such "stupid" errors.
Comment 19 Buovjaga 2017-06-21 18:59:29 UTC
(In reply to Ferdinand from comment #18)
> Sorry guys,
> 
> I am a (python, sql) developer myself and I am aware of the danger of
> deleting referenced cells - a widely missing feature in all spreadsheets I
> know.
> 
> The problems hits less experienced users who should be protected against
> such "stupid" errors.

Then you can create a Python extension for it.

If we implemented this in core, then we would get dozens of bug reports complaining about performance worsening on deleting cell contents.
Comment 20 Cor Nouws 2018-11-28 18:22:15 UTC
(In reply to Ferdinand from comment #0)
> if a referenced cell is deleted (delete row/column) the referencing cells
> show #REF
> if this cell is on a different table or out of view it will not be
> recognized by the user IN TIME !

A user deleting data in a spreadsheet should know what he/she is doing.
I expect more situations can be found to 'help' users. I wouldn't start along this path.
Comment 21 Heiko Tietze 2018-11-28 19:18:41 UTC
There is a general disagreement to your idea. I would appreciate a very unobtrusive method of communication like via statusbar. But since we don't have this we communicate per messagebox or infobar not even a balloon tip, and many other situation would need to inform the user, the proposal is a WONTFIX.
Comment 22 Ferdinand 2019-01-16 12:05:56 UTC
(In reply to Cor Nouws from comment #20)
> (In reply to Ferdinand from comment #0)
> > if a referenced cell is deleted (delete row/column) the referencing cells
> > show #REF
> > if this cell is on a different table or out of view it will not be
> > recognized by the user IN TIME !
> 
> A user deleting data in a spreadsheet should know what he/she is doing.
> I expect more situations can be found to 'help' users. I wouldn't start
> along this path.

I a agree partly with "a user deleting data", the problem is often "another user is deleting .. "

in general I doubt that the majority - especially beginners - know what they are doing. and even myself. after a few years not working in a specific spreadsheet I can't remember some references and I am surprised to find a REF error in another sheet.

the function "trace dependents" is available and could be used.
example 
sheet 1 cell a1=1, cell a2=2, 
sheet 2, cell a1=+$sheet1.A1+$sheet1.A2
clicking trace dependents in sheet 1 cell a2 creates a blue line with a dot in cell a2 and a square - undefined.
at least the user would know that deleting the row/column with cell a2 will create REF Error
Again, the performance argument is a weak one as the test needs to be fired only on "delete", especially compared with the time needed to repair the error. Sometimes the repair process is almost impossible, if for example the original users has left the company. Checking all backups (if available) is extremely time consuming.
Comment 23 Ferdinand 2019-09-14 17:42:10 UTC
me again ;-)
Version: 6.3.1.2

we do get a warning if we want to past new content into cells with content
Comment 24 Ferdinand 2019-09-14 17:42:33 UTC Comment hidden (obsolete)
Comment 25 Ferdinand 2019-09-14 17:44:44 UTC
we also should get a warning if referenced cells are removed
Comment 26 Ferdinand 2019-09-14 17:46:17 UTC
Created attachment 154163 [details]
warning overriding cells with content
Comment 27 Cor Nouws 2019-11-02 09:33:13 UTC
Hi Ferdinand,

(In reply to Ferdinand from comment #16)
> Sorry I do not understand this reasoning in comment 15
> 
> the referenced cell shows the error immediately (given automatic calc is on) 
> if in addition to the error in the cell a pop up is triggered with the undo
> option it would solve the problem without noticeable delay. 
That sounds as if it is easier to implement, without the negative effects on performance, and other trouble that @erack explained.
But I doubt it really is simpler, because it still would be necessary not only do the changes invoked by a user action (which in done automatically, unless it is turned off) to track if one or more of the changes indeed are invalidated results, that then would trigger the popup. The latter is simple, but the step before.. Eike, if you could be so kind to give your expert input on this..

(In reply to Ferdinand from comment #23/25)
> we do get a warning if we want to past new content into cells with content
> we also should get a warning if referenced cells are removed
That could be a completely different approach?
Such as: I delete some content for the first time, then a popup tells me: "are you really sure, you may break formulas .. etc" ?
But rather generic, probably panicking inexperienced users. And how to act on editing cell contents?

How much I like (or not, as a professional trainer ;) ) the idea to prevent users doing stupid things, I still see no workable solution for this..
Comment 28 Ferdinand 2020-02-06 20:24:00 UTC
Hi, i just checked 6.4 

suggested solution:
Before deleting a column, row or sheet all cells to be deleted must be checked with

"Detective/Trace dependents" 

and raise an error "Cell x:y on sheet z" depends on "Cell a:b on sheet c"  for the first positive.

This would create a very unique selling point - at least for a while 
and save a lot of time and tears.

And from an usability point of view, I think it's a trade off between performance and time spent for restoring broken sheets.

IMO a very clear decision. 
and if someone really prefers or needs ref errors due to performance issues, this can be made configurable like "iterative references". 

sorry to be irksome.
Comment 29 Heiko Tietze 2020-02-17 14:35:56 UTC
(In reply to Ferdinand from comment #28)
> Before deleting a column, row or sheet all cells to be deleted must be
> checked with...

It still requires to scan the whole document, which is time-consuming. See comment 15. However, you may easily write a macro that does exactly what you need.
Comment 30 Buovjaga 2023-01-05 12:45:38 UTC
*** Bug 148319 has been marked as a duplicate of this bug. ***