Bug 159595 - Data validation without error check allows to enter data other than defined
Summary: Data validation without error check allows to enter data other than defined
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords:
Depends on:
Blocks: Cell-Validity
  Show dependency treegraph
 
Reported: 2024-02-06 13:13 UTC by Heiko Tietze
Modified: 2024-10-28 08:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test file (10.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-02-07 12:49 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2024-02-06 13:13:15 UTC
Validity = List with A,B

Entering C gives a warning and empties the input.

But if the option "Show error message..." under Error Alert is off, the value is accepted anyway and validation fails.
Comment 1 ady 2024-02-06 13:57:25 UTC
Repro.
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1647493e5cbb9cf4f06b7d0387d6763a2f30fdae
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: threaded

Inherited.
Comment 2 Julien Nabet 2024-02-06 20:42:52 UTC
I gave a try with:
https://gerrit.libreoffice.org/c/core/+/163064
Comment 3 Commit Notification 2024-02-07 07:30:23 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c869fb5ea2fa1dbbfa7c17754aeac48ed7f77cc4

tdf#159595: Data validation without error check allows to enter wrong data

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Julien Nabet 2024-02-07 07:30:48 UTC
Cherry-pick for 24.2 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/163020
Comment 5 Heiko Tietze 2024-02-07 12:20:26 UTC
Worse than before, now I can enter "c" when the validity allows only "a" and "b" and don't even get a warning. What I expect is the same as with warning - after confirmation the input is clear, just without the confirmation but onEnter/onLeave.
Comment 6 Julien Nabet 2024-02-07 12:49:06 UTC
Created attachment 192448 [details]
test file

I don't understand your last comment.

I attached an example file with both cases:
- 1 with validity list on "a" and "b" with error message showed
- 1 with validity list on "a" and "b" with error message not showed
when testing both by trying to put "c", in both cases it's reverted in previous state, first one with error message, the second one, without.
Comment 7 BogdanB 2024-02-07 16:51:07 UTC
Heiko, for me the change looks good.

I can not insert a "c" on any of the cells.
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 41c9b2a81e9eb795aaecc8c52a8e7bce0a5a3c07
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Was bad in (for comparison reason). I can insert a "c" in this version
Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 8 Julien Nabet 2024-02-08 07:44:43 UTC
Heiko: could you attach an example file?
Comment 9 Heiko Tietze 2024-02-08 08:44:06 UTC
No I cannot recap. Perhaps I was fooled by the elusive implementation of validation - in many cases like when deleting content, you also remove the validation. But that would be another topic... Thanks for the patch!
Comment 10 BogdanB 2024-02-08 08:47:28 UTC
Verifid with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 41c9b2a81e9eb795aaecc8c52a8e7bce0a5a3c07
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 11 Heiko Tietze 2024-02-08 08:53:49 UTC
(In reply to Heiko Tietze from comment #9)
> elusive implementation of validation
That's wrong. In fact my miscomprehension is caused by the "Delete Contents" dialog (shown on backspace), which remembers the configuration and keeps "Delete All". And without reading all the bits and pieces I overlooked "[ ] Formats" (apparently off but I'd understand All as all).

Either we don't remember the last setting in this dialog, and/or make All a function that just toggles the checkboxes on. And why is this needed for backspace anyway? I'd expect shift+delete to offer more functions.
Comment 12 Commit Notification 2024-02-08 22:29:11 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/b7a1ff456629549f66c93a5258073f1394598174

tdf#159595: Data validation without error check allows to enter wrong data

It will be available in 24.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 ornanovitch 2024-03-07 16:14:22 UTC
I see a problem here :/
While this patch is perfectly legit, the issue was so old that some users (like me) had the habit to use it like a feature, that could be called a "suggestions dopdown". I built so many tools with this, and now I lost one of their main feature. Could this bug be re-introduced as an official feature with a new checkbox like "authorize custom values"?
Comment 14 Julien Nabet 2024-03-07 16:28:51 UTC
(In reply to ornanovitch from comment #13)
> I see a problem here :/
> While this patch is perfectly legit, the issue was so old that some users
> (like me) had the habit to use it like a feature, that could be called a
> "suggestions dopdown". I built so many tools with this, and now I lost one
> of their main feature. Could this bug be re-introduced as an official
> feature with a new checkbox like "authorize custom values"?

So "Show error message..." disabled would mean "I don't care about the validity list", personally would strongly disagree. A bug isn't a feature.
If you want accept any string in your cells, just remove the validity list.
If you don't want to lose a long list, just use it on a specific unused cell that you can copy.
Comment 15 ornanovitch 2024-03-07 20:15:03 UTC
(In reply to Julien Nabet from comment #14)
> (In reply to ornanovitch from comment #13)
> > I see a problem here :/
> > While this patch is perfectly legit, the issue was so old that some users
> > (like me) had the habit to use it like a feature, that could be called a
> > "suggestions dopdown". I built so many tools with this, and now I lost one
> > of their main feature. Could this bug be re-introduced as an official
> > feature with a new checkbox like "authorize custom values"?
> 
> So "Show error message..." disabled would mean "I don't care about the
> validity list", personally would strongly disagree. A bug isn't a feature.
> If you want accept any string in your cells, just remove the validity list.
> If you don't want to lose a long list, just use it on a specific unused cell
> that you can copy.

Sorry, that's not what I meant. I just wanted to notice that users like me (I hope I'm not the only one) have "used" this bug as if it was a feature in order to achieve a sort of "suggestion dropdown" (like a helper: you can chose a predefined value or enter yours), which can be a very powerful tool. I use this trick for so long that I didn't even remember it was the result of a bug.

Again, I strongly support this patch because it indeed corrects a bug, that's perfect! I just wanted to advertise that it has a side effect because during so many years, users like me had used it that way.

I'm not asking to revert it, but to provide a new way to allow users to enter their own value if the ones proposed are not suitable. It's a fact that a bug has been properly fixed and it's a good thing, but it's also a fact that this bug had a cool side effect that might still be used in a lot of documents.
Comment 16 Julien Nabet 2024-03-07 20:50:04 UTC
(In reply to ornanovitch from comment #15)
> (In reply to Julien Nabet from comment #14)
> ...
> Sorry, that's not what I meant. I just wanted to notice that users like me
> (I hope I'm not the only one) have "used" this bug as if it was a feature in
> order to achieve a sort of "suggestion dropdown" (like a helper: you can
> chose a predefined value or enter yours), which can be a very powerful tool.
> I use this trick for so long that I didn't even remember it was the result
> of a bug.
> ...

Ok so you'd like a kind of Autoinput but not based on what have already been typed but on some predefined input.
Perhaps it should be an extension I don't know.
Anyway, to discuss further about it you should submit a enhancement request.
Comment 17 Heiko Tietze 2024-03-08 09:00:58 UTC
(In reply to ornanovitch from comment #15)
> I just wanted to notice that users like me... have "used" this bug
> as if it was a feature in order to achieve...
https://xkcd.com/1172/ :-)

(Hope you will accommodate to the new situation)
Comment 18 ornanovitch 2024-03-08 09:43:22 UTC
(In reply to Heiko Tietze from comment #17)
> (In reply to ornanovitch from comment #15)
> > I just wanted to notice that users like me... have "used" this bug
> > as if it was a feature in order to achieve...
> https://xkcd.com/1172/ :-)
> 
> (Hope you will accommodate to the new situation)

Crual but true I admit :p

Thanks all, I'll open a feature request as I think there is something really cool to offer here.
Comment 19 Pretender86 2024-03-13 15:37:09 UTC
Hello Julien Nabet, how are you?? I just installed the latest version of LibreOffice and had the same problem ornanovitch refered as I was using the bug that was now fixed as a feature. Had to return to an old version as to accomodate this change I have to alter the ODS files.

Could this bug be re-introduced as an official feature with a new checkbox like for example "authorize custom values"??

Thank you Julien Nabet, best regards
Comment 20 Julien Nabet 2024-03-13 16:10:50 UTC
(In reply to Pretender86 from comment #19)
> ...
> Could this bug be re-introduced as an official feature with a new checkbox
> like for example "authorize custom values"??
>...
IMHO it's better to submit a new bugtracker as an enhancement instead of revamping this one.
Comment 21 ornanovitch 2024-03-13 16:12:33 UTC
(In reply to Pretender86 from comment #19)
> Hello Julien Nabet, how are you?? I just installed the latest version of
> LibreOffice and had the same problem ornanovitch refered as I was using the
> bug that was now fixed as a feature. Had to return to an old version as to
> accomodate this change I have to alter the ODS files.
> 
> Could this bug be re-introduced as an official feature with a new checkbox
> like for example "authorize custom values"??
> 
> Thank you Julien Nabet, best regards

Join us here https://bugs.documentfoundation.org/show_bug.cgi?id=160096 :)
Comment 22 Pretender86 2024-03-13 16:31:31 UTC
Thank you. I will definitely join as this is a small change but an impactfull one :D best regards to everyone
Comment 23 Julien Nabet 2024-04-12 10:17:18 UTC
*** Bug 160638 has been marked as a duplicate of this bug. ***
Comment 24 Brian Fletcher 2024-10-28 04:44:32 UTC Comment hidden (spam)