Bug 431297 - Removing all categories from an event causes "Akonadi::Exception: No objects specified"
Summary: Removing all categories from an event causes "Akonadi::Exception: No objects ...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: incidence editors (show other bugs)
Version: 5.16.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 384023 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-08 09:58 UTC by wjb
Modified: 2021-01-28 01:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wjb 2021-01-08 09:58:54 UTC
SUMMARY

Removing all the categories/tags from an event in the event editor causes an error. The modified event cannot be saved. Removing only some, but not all, categories does not cause this error.

STEPS TO REPRODUCE
1. Add an event to a CalDAV calendar some with categories/tags.
2. Save the event.
3. Edit the event and remove all categories/tags.
4. Press "ok" or "Apply" to save the event.
5. An error is raised "Error while trying to modify calendar item. Error was: Akonadi::Exception: No objects specified"
6. Press "OK"
7. A warning is displayed:
  > Unable to store the incidence in the calendar. Try again?
  >
  > Reason: Akonadi::Exception: No objects specified
  Selecting "Yes" returns to step 5; selecting "No" returns to the edit event dialog
8. Select "Cancel"; the event cannot be edited.
  

OBSERVED RESULT
All categories/tags cannot be removed from an event; the event must instead be deleted and recreated without categories/tags.

EXPECTED RESULT
All categories/tags should be able to be removed from an event.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux 5.10.2-2-MANJARO 64bit

KDE Plasma Version: 5.10.4 
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 gjditchfield 2021-01-08 21:12:44 UTC
The same error occurs if the calendar is a local ICS file.
Comment 2 Bug Janitor Service 2021-01-27 03:50:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akonadi/-/merge_requests/46
Comment 3 gjditchfield 2021-01-27 08:16:26 UTC
Git commit b71307a40fb0c3919191e11bfcfc5cc34a40bf57 by Glen Ditchfield.
Committed on 27/01/2021 at 03:44.
Pushed by dvratil into branch 'release/20.12'.

Fix bug when deleting the last tag

When IncidenceEditor deletes the last tag of an incidence, it
calls `Item::setTags()` with an empty tag list, and eventually
`ProtocolHelper::entitySetToScope()` rejects the empty list and
returns an error.
FIXED-IN: 5.16.2

M  +4    -1    src/core/jobs/itemmodifyjob.cpp

https://invent.kde.org/pim/akonadi/commit/b71307a40fb0c3919191e11bfcfc5cc34a40bf57
Comment 4 gjditchfield 2021-01-28 01:43:19 UTC
*** Bug 384023 has been marked as a duplicate of this bug. ***