Open Bug 325449 Opened 20 years ago Updated 1 year ago

Handle import of existing events intelligently [Error code: DUPLICATE_ID. Description: ID already exists for addItem]

Categories

(Calendar :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: jem.benazra, Unassigned)

References

(Depends on 1 open bug)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8) Gecko/20051111 Firefox/1.5 When I load an event which already exist, it make a failed import error. I don't know if the message is conform but i'd like to be notify if this event already exist or if the import realy failed Reproducible: Always Steps to Reproduce: 1.Import an *.ics event 2.Import the same event 3. Actual Results: Import failed Expected Results: This event already exist
Summary: Import an event wich already exist → Display a clear error message, when importing an event which already exists
Ultimately, we should actually compare the events being imported to see if they differ. If they do, the right thing to do is probably pop up a dialog with various different options, including aborting the import, handling the conflicting events one-by-one, allowing the import to always win or lose. This code can probably be shared, to some extent, with caching/sync code as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Summary: Display a clear error message, when importing an event which already exists → handle importing existing events intelligently
*** Bug 330547 has been marked as a duplicate of this bug. ***
(In reply to comment #2) > *** Bug 330547 has been marked as a duplicate of this bug. *** > My bug, 343461,was marked as a dupe of 330547. now 330547 has been marked as a dupe of this one...but this one doesn't have anything to do with mine...mine is an error where there are no duplicate items in the schedule...trying to import the .ics into a new, empty, calendar...
(In reply to comment #3) This doesn't matter. It is one database. If the event already exist in that database (even if in another calendar) the error message is shown at the moment.
(In reply to comment #4) > (In reply to comment #3) Thanks for clarification, it makes sense now. i was under the assummption each calendar within the program was actually separate.
carrying over bug 330547's blocking0.3?
Flags: blocking0.3?
Would accept a patch, but we're not going to block on this.
Flags: blocking0.3? → blocking0.3-
Each calendar file should be a separate database. In Sunbird 0.2, if I deleted a calendar, it deleted all events with it, too, hence I could re-import an ics file to put it into a new calendar. I can't do that with Lightning.
*** Bug 356913 has been marked as a duplicate of this bug. ***
Import an UPDATED item with an EXISTING UID. You'll get: "1 items failed to import. The last error was: 2147500037" The error message proposed above: "This even already exists" Is not the RFC2445 compliant solution. In this case we've updated the event, so the old entry should be REPLACED. There really should never be a situation where a UID duplicated, unless it is meant to be an update to the original event (or a harmless duplicate of the same event).
jem, could you pls test with the latest trunk / 0.8pre nightlies and see if this issue still occurs?
Depends on: 450653
Summary: handle importing existing events intelligently → Handle import of existing events intelligently [Error code: DUPLICATE_ID. Description: ID already exists for addItem]
Severity: normal → S3

This is still a problem on Thunderbird 102.11.0 (64-bit) on Ubuntu 23.04; though it was marked as resolved in #497200 due to lack of response.

console.warn: Calendar: There has been an error reading data for calendar: Work. However, this error is believed to be minor, so the program will attempt to continue. Error code: DUPLICATE_ID. Description: ID already exists for addItem

I'd like to help testing out a branch or nightly (if there's a solution in place).

Duplicate of this bug: 1853250

This bug is classified as Severity: S3.

The definition of S3 is "Blocks non-critical functionality and a work around exists".

Can somebody please explain what the necessarily existing 'work around' is that justifies the classification?

I'm getting this error with Thunderbird 128.2.3esr (the Snap package on Ubuntu 24.04.1 LTS) when trying to load the Canada and U.S. calendars from the Thunderbird Holiday Calendars website. Those calendars have many duplicate UID values. For example:

$ grep UID: CanadaHolidays.ics | wc -l
239
$ grep UID: CanadaHolidays.ics | sort -u | wc -l
64

$ grep UID: USHolidays.ics | wc -l
1699
$ grep UID: USHolidays.ics | sort -u | wc -l
424

Just taking the first unique event from the Canada calendar when sorted, it looks as if someone copied-and-pasted the 2024 events into the years 2025 and 2026, like so:

BEGIN:VEVENT
SUMMARY:Tartan Day
DTSTART;VALUE=DATE:20240406
DTEND;VALUE=DATE:20240407
DTSTAMP:20240903T094736Z
UID:034642290dc45e7414c862a79348d5a5
CATEGORIES:Holidays
CLASS:public
DESCRIPTION:Observance - Tartan Day is a special day for Canadians to cele
 brate their national\, provincial\, territorial or personal tartans.
--
BEGIN:VEVENT
SUMMARY:Tartan Day
DTSTART;VALUE=DATE:20250406
DTEND;VALUE=DATE:20250407
DTSTAMP:20240903T094737Z
UID:034642290dc45e7414c862a79348d5a5
CATEGORIES:Holidays
CLASS:public
DESCRIPTION:Observance - Tartan Day is a special day for Canadians to cele
 brate their national\, provincial\, territorial or personal tartans.
--
BEGIN:VEVENT
SUMMARY:Tartan Day
DTSTART;VALUE=DATE:20260406
DTEND;VALUE=DATE:20260407
DTSTAMP:20240903T094738Z
UID:034642290dc45e7414c862a79348d5a5
CATEGORIES:Holidays
CLASS:public
DESCRIPTION:Observance - Tartan Day is a special day for Canadians to cele
 brate their national\, provincial\, territorial or personal tartans.

When I subscribe to them by URL, I get the MODIFICATION_FAILED error. When using File > Open > Calendar File, the events just don't show up. When I open the Developer Tools Console and synchronize the calendar, I see the error about a DUPLICATE_ID.

Are these holiday calendars simply malformed? Please let me know if I should open a new bug against the calendar files themselves. I added this comment here for others because this is the closest match I found for the error I'm getting.

You need to log in before you can comment on or make changes to this bug.