Description: When using the Sampling tool, the options "With replacement" and "Keep order" are exclusive. Ticking one unticks the other one. The user should be able to create a sample with replacement while still conserving the order they appear in. The UX would also improve as the two choices currently use tickboxes that make it look like both can be ticked at the same time. Steps to Reproduce: 1. Open Calc 2. Create a range of values, for example the sequence 1 to 10 in the range A1:A10 3. Select said range 4. Open the sampling dialogue: Data > Statistics > Sampling... 5. Input range should be the selected range 6. Results to: B1 7. Sample size: any value above 1 8. Sampling method: Random 9. Tick "With replacement" and "Keep order" Actual Results: The two option are exclusive. Ticking one unticks the other. Expected Results: The two options don't need to be exclusive: one might want sampling to happen with replacement, but still keeping the values in the original order. For example: - Sample the sequence: 1, 3, 2, 4 - Use "With replacement" and "Keep order" and a sample size of 6 - Get an output like: 1, 1, 1, 2, 4, 4 Reproducible: Always User Profile Reset: No Additional Info: Tested on: Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: e3086b58eb5427d520b86c185f9d911bb6f7a3a0 CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-21_15:37:11 Calc: threaded and: Version: 7.2.0.0.beta1 / LibreOffice Community Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded and: Version: 7.0.6.2 Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded
Repro NixOS Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: b1df9c67349cf4cc5be4128d797aefb87f50e38f CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: x11 Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded
Looks like it behaved like this since the options were introduced in 6.3
Dear stragu, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Still reproduced in: Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 479b5bbe8ca2177ba7574e7aa2308b5d0de1895c CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded Same on Windows. Rafael, not sure if it's something you'd be interested in?
(In reply to Stéphane Guillou (stragu) from comment #4) > Rafael, not sure if it's something you'd be interested in? Indeed... this seems like an implementation error. Also it does not make sense to have 2 check boxes that behave as radio buttons. I'll take a look into it.
Apparently this issue is "intentional". The method ScSamplingDialog::PerformRandomSamplingKeepOrder [1] assumes that when "Keep Order" is checked, the sampling must be "without replacement". The implementation does not consider the possibility of replacement. To fix this issue, we would have to implement a new method to perform sampling with replacement while keeping the original order. This is doable, but not trivial. I'll add this to my to-do list, hopefully in time for 24.8. [1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx