Closed Bug 346540 Opened 15 years ago Closed 14 years ago

empty "select calendar" dialog when import .ics

Categories

(Calendar :: Import and Export, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: damian.publicemail, Assigned: Fallen)

References

(Depends on 1 open bug)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060729 Calendar/0.3a2+

When I remove all calendars and try to import event from *.ics got empty dialog: select calendar

Reproducible: Always

Steps to Reproduce:
1. delete all calendars
2. download webcal://ical.mac.com/zakosmala/Polish32Holidays.ics and import it via menu file -> Import... from local file system
   -> empty dialog "select calendar" is opened
Actual Results:  
JS console:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIListBoxObject.getItemAtIndex]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/listbox.xml :: getItemAtIndex :: line 480"  data: no]

Expected Results:  
not sure but import should be disabled when there is none calendar in Sunbird

it also happend when I had one calendar (Home) but only when I tried to import my private events into clean profile
Version: unspecified → Trunk
Attached image screenshot
Error received when performing a local import with the Home calendar still installed.
Confirming this bug with additional information - when performing an import of a local calendar with the Home calendar still installed, I receive the error above (Error from Local Import...).
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #3)
> Confirming this bug with additional information - when performing an import of
> a local calendar with the Home calendar still installed, I receive the error
> above (Error from Local Import...).
> 
This error if often thrown if you try to import duplicate items (even if the duplicates are in another calendar).  Was that the case here?
We already disable creating new items, we should also disable importing, since there isn't any calendar to import into.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #235444 - Flags: second-review?(mvl)
Attachment #235444 - Flags: first-review?(ssitter)
Comment on attachment 235444 [details] [diff] [review]
also disable import

You must also re-enable the item.
Attachment #235444 - Flags: second-review?(mvl)
Attachment #235444 - Flags: first-review?(ssitter)
Attachment #235444 - Flags: first-review-
The other possibility would be to handle it like Lightning: If no calendar is present and File->New->Event is performed the default 'Home' calendar is created. Sunbird does something similar but only during startup (It's really time to unify that code)

If no calendar is present you will have to disallow create/import/export/publish/edit commands, disallow drag'n'drop in view and likely some other things.
Blocking 0.5?
Flags: blocking-calendar0.5?
We won't block 0.5 on this.
Flags: blocking-calendar0.5? → blocking-calendar0.5-
I would also prefer just creating a Home calendar on such operations. We could also show a dialog a la 'no calendar existed, we created one' with a "Don't show this again" checkbox, but its not really necessary. I'd like some QA discussion on how it should be solved.
Assignee: jminta → bugzilla
Status: ASSIGNED → NEW
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [qa discussion needed]
Version: Trunk → unspecified
Status: NEW → ASSIGNED
During the QA Chat, we found that we should not auto-create calendars. We came to the consensus, that we should show the new calendar wizard, with an additional text on the first wizard page, telling the user that there were no calendars and he has the choice to create one now. The items should then be automatically imported after the calendar is created. An additional message on the last wizard page is probably also a good idea.
Whiteboard: [qa discussion needed]
Flags: blocking-calendar0.7?
Depends on: 314594
Blocks: 351745
bug 394025 will auto-create a local calendar for 0.7 => no candidate for 0.7
Flags: blocking-calendar0.7? → blocking-calendar0.7-
Since now both sunbird and lightning do not allow deleting the last calendar, I think this bug can be closed. If at some point we decide to change this behavior, we can reopen.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → VERIFIED
Flags: blocking-calendar0.7-
Flags: blocking-calendar0.5-
You need to log in before you can comment on or make changes to this bug.