Bug 150465

Summary: RANDBETWEEN() description in Function wizard should include whether the upper and lower bounds are included
Product: LibreOffice Reporter: Taavi Väänänen <hi+tdf>
Component: CalcAssignee: Rafael Lima <rafael.palma.lima>
Status: VERIFIED FIXED    
Severity: enhancement CC: 79045_79045, himajin100000, rafael.palma.lima
Priority: medium    
Version: 7.4.0.0 beta1+   
Hardware: All   
OS: All   
Whiteboard: target:7.5.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 105582    

Description Taavi Väänänen 2022-08-18 07:06:01 UTC
Description:
The documentation of RANDBETWEEN currently states that it 'returns a random integer between the numbers you specify'. It's a bit unclear if the upper and lower bounds can be included in the generated numbers or not.

Steps to Reproduce:
1. Open Calc and its "Function Wizard" tool from the tool bar
2. Search for "RANDBETWEEN"


Actual Results:
The documentation is clear whether the specified integers can be included in the generated random numbers.

Expected Results:
The documentation is unclear.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 1:7.4.0~rc2-3
Calc: threaded
Comment 1 Rafael Lima 2022-08-18 14:25:07 UTC
The help page does make it clear that both Bottom and Top are included in the possible results. See [1]:

[1] https://help.libreoffice.org/master/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3164669

I believe we can make it clear in the Function Wizard as well, without increasing too much the size of the description text.

This fix should apply to RANDBETWEEN and RANDBETWEEN.NV.
Comment 2 Rafael Lima 2022-10-29 22:25:47 UTC
https://gerrit.libreoffice.org/c/core/+/141922
Comment 3 Commit Notification 2022-10-31 16:09:16 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

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

tdf#150465 Improve description of RANDBETWEEN in function wizard

It will be available in 7.5.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 Stéphane Guillou (stragu) 2022-12-13 16:16:44 UTC
Verified in:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ad085990b8073a122ac5222e5220f8f1d6826dcf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded