SUMMARY When editing an event item in the korganizer search result list it gets updated and the chosen sort order is lost. It has probably always been like that, but from a usability point of view this seems highly discouraged since editing multiple search result entries becomes incredibly much more tedious (list needs to be sorted again and then the subsequent entry be identified). STEPS TO REPRODUCE 1. Activate at least one calendar with a couple of events. Press Ctrl+F and search for "*" to find all events in an interval. 2. Click the "Summary" header in the search result list to sort by the event summary field. 3. Double-click one of the events to edit it. Confirm the change. OBSERVED RESULT Event is changed and the search result list is reloaded, but looses the sorting previously determined. EXPECTED RESULT Event is changed and the search result list is reloaded and retains the sorting previously determined. ADDITIONAL INFORMATION May be considered a usability bug.
The issue is evidently in EventViews::ListView here https://github.com/KDE/eventviews/blob/master/src/list/listview.cpp There is a hard coded sort order via d->mTreeWidget->sortItems(StartDateTime_Column, Qt::AscendingOrder); in ListView::updateView() probably causing this behaviour. The order should probably be set to StartDateTime_Column only initially. I only do not know what else depends on this as it looks like a conscious decision.
A possibly relevant merge request was started @ https://invent.kde.org/pim/eventviews/-/merge_requests/38
Git commit 59afb8ff462a5da831a8daf3ebe064846f556504 by Glen Ditchfield. Committed on 28/08/2021 at 00:56. Pushed by gditchfield into branch 'release/21.08'. Preserve sorting in the ListView When an incidence editor changes an incidence, the ListViews in the Event View and the Search Dialog update, and re-sort themselves by the starting date in ascending order, overriding the user's choice. This patch tracks changes to the view's sort column and order, and also saves them in the application settings. M +15 -1 src/list/listview.cpp M +2 -0 src/list/listview.h https://invent.kde.org/pim/eventviews/commit/59afb8ff462a5da831a8daf3ebe064846f556504
Tested and confirm that the patch fixes the issue.