pimutils / pimutils/khal

Importing cancellation of a single event in a series deletes series, leaves single event

Open
#1,466 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

Describe the bug
Given a recurring event, if I import an .ics file that represents the cancellation for a specific instance (recurrence), then then khal deletes the whole series and leaves only one event in place, namely the one that was cancelled, except it's not cancelled. Effectively, khal import does the exact opposite of what it should do.

To Reproduce
Steps to reproduce the behavior:

  1. Unpack khal.zip

  2. Import the included invitation;

  3. Confirm that a new daily event "Test2" exists:

     % khal list 2026-04-20 2d
     Monday, 2026-04-20
     13:00-13:40 Test2 ⟳
     Tuesday, 2026-04-21
     13:00-13:40 Test2 ⟳
    
  4. Import the included cancellation, which is a METHOD:CANCEL with RECURRENCE-ID:20260421T130000, i.e. cancelling the event instance on 2026-04-21;

  5. Confirm that the cancelled event on Tuesday is actually still there (albeit cancelled), but the other events in the recurrence are gone:

     % khal list 2026-04-20 2d
     Tuesday, 2026-04-21
     CANCELLED 13:00-13:40 Test2 ⟳
    

OS, version, khal version and how you installed it:

0.14.0 from PyPi, Python 3.13.12, Debian unstable, amd64, empty config

click==8.3.2
click-log==0.4.0
configobj==5.0.9
icalendar==7.0.3
khal==0.14.0
python-dateutil==2.9.0.post0
pytz==2026.1.post1
pyxdg==0.28
six==1.17.0
tzdata==2026.1
tzlocal==5.3.1
urwid==4.0.0
wcwidth==0.6.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the khal import entry point and reproduce the behavior using the attached khal.zip, first importing the recurring “Test2” invitation and then its METHOD:CANCEL with RECURRENCE-ID:20260421T130000. Done means the cancellation removes only the 2026-04-21 instance while the other events in the daily series remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.