Bug 128843 - enhancement: if text is already in a section, ask for confirmation before linking a file in the section
Summary: enhancement: if text is already in a section, ask for confirmation before lin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: dataLoss
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2019-11-16 17:10 UTC by sdc.blanco
Modified: 2020-01-27 10:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2019-11-16 17:10:47 UTC
Problem:  Linking a file into a section replaces text that was previously in the section.

Not possible to "undo" (e.g. Ctrl-Z).  

Therefore enhancement proposal for a confirmation warning.

Procedure to see problem:

1.  Insert > Section
2.  Enter text in section
3.  Right click - Edit Section
4.  Choose Link, enter filename, and OK
5.  Text entered in step 2 is lost with loading of linked text.

Additional information
1. Not possible to "Undo"
2. The unsuspecting user who then unlinks the file (hoping to recover the lost text) will see that only the file remains, not the original text.
3. This happens even if the section was marked previously as write-protected (i.e., false protection).

Suggestion:  

Version 1:  Before linking an external file, pop-up a confirmation box that warns that all contents of the section will be lost(or replaced).

Version 2:  If it is easy/possible to evaluate whether the section is empty, then only pop-up confirmation when there is actually something to be lost.
Comment 1 Heiko Tietze 2019-12-11 08:21:35 UTC
Would take this as a serious issue. Either we show the confirmation "By linking a file you will loose all text in this section. Proceed?" or make it undoable. Right now it's a dangerous function.
Comment 2 Xisco Faulí 2019-12-12 10:07:17 UTC
(In reply to Heiko Tietze from comment #1)
> Would take this as a serious issue. Either we show the confirmation "By
> linking a file you will loose all text in this section. Proceed?" or make it
> undoable. Right now it's a dangerous function.

Hi Heike,
Considering it's a high severity bug, do you plan to work on it ?
Comment 3 Heiko Tietze 2019-12-13 07:04:53 UTC
(In reply to Xisco Faulí from comment #2)
> Considering it's a high severity bug, do you plan to work on it ?

Clearly out of my scope; well maybe the confirmation box but not with checking if the sections has content (and needs a warning) or not (doesn't need a warning).

I would always treat dataloss as high severity. We could turn this into a bug since data must never get lost.
Comment 4 sdc.blanco 2020-01-09 17:11:49 UTC
(In reply to Heiko Tietze from comment #3)
> Clearly out of my scope; well maybe the confirmation box but not with
> checking if the sections has content (and needs a warning) or not (doesn't
> need a warning).
Friendly suggestion:  

Maybe a confirmation box in all cases is acceptable (preferable) to start.

The trade-off is "irritation" (to workflow) for those who regularly link sections versus the "shock" and "dismay" to those who just wrote three pages into a section (that was not saved), and therefore lost.

And if a "Do not warn again" checkbox can be included in the confirmation dialog, then the "unsuspecting" are protected, while those who turn off the warning have made an informed choice.

The more elegant solution (with conditionality on section content) could come later.
Comment 5 sdc.blanco 2020-01-27 08:43:19 UTC
With LO 6.3.4.2

New Document
Tyoe:
  hello 
  hello 
Select second "hello"
Insert>Section, click on Link in Section dialog box.

Result:  Confirmation box, warning about text loss with link!

NB.  This warning is BEFORE a section is actually created.

Suggestion in comment 4 is to also give such a warning when adding a link within an existing section.