Bug 445787

Summary: open and closed rules should not be combined
Product: [Applications] KOpeningHours Reporter: HubMiner <cal030>
Component: normalizationAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description HubMiner 2021-11-20 03:53:21 UTC
Please add handling for following cases:
Sa 08:00-12:00; 11:30-13:00 off

Open and closed rules should not be suggested for combining.
Comment 1 Bug Janitor Service 2021-12-05 10:22:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/kopeninghours/-/merge_requests/82
Comment 2 David Faure 2021-12-05 10:41:36 UTC
Git commit c1681b453408eec6c6a78d6c1b1030b7d9265ed9 by David Faure.
Committed on 05/12/2021 at 10:20.
Pushed by dfaure into branch 'master'.

Fix autocorrect for cases where the state differs

The testcase in the bug is "Sa 08:00-12:00; 11:30-13:00 off"
but I also added tests (and fixes) for other autocorrect features
which misbehaved when the state was different between the two rules.

M  +5    -0    autotests/parsertest.cpp
M  +4    -1    src/lib/openinghours.cpp
M  +6    -0    src/lib/rule.cpp
M  +1    -0    src/lib/rule_p.h

https://invent.kde.org/libraries/kopeninghours/commit/c1681b453408eec6c6a78d6c1b1030b7d9265ed9
Comment 3 David Faure 2021-12-05 10:58:29 UTC
Git commit 10dd6fd4cf45149df2e042e51aab44b470ceb98c by David Faure.
Committed on 05/12/2021 at 10:58.
Pushed by dfaure into branch 'release/21.12'.

Fix autocorrect for cases where the state differs

The testcase in the bug is "Sa 08:00-12:00; 11:30-13:00 off"
but I also added tests (and fixes) for other autocorrect features
which misbehaved when the state was different between the two rules.
(cherry picked from commit c1681b453408eec6c6a78d6c1b1030b7d9265ed9)

M  +5    -0    autotests/parsertest.cpp
M  +4    -1    src/lib/openinghours.cpp
M  +6    -0    src/lib/rule.cpp
M  +1    -0    src/lib/rule_p.h

https://invent.kde.org/libraries/kopeninghours/commit/10dd6fd4cf45149df2e042e51aab44b470ceb98c