Closed Bug 409249 Opened 17 years ago Closed 17 years ago

Creating Tasks should return an error

Categories

(Calendar :: Provider: GData, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jan.vanbruaene, Assigned: Fallen)

Details

(Whiteboard: [gdata-0.4])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: Although the GDATA Provider FAQ clear states "Google doesn't support Tasks, so there is no way the provider can support them.", the user should receive an error when trying to create a task. Currently this is a silent failure. Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: There is no Task creation error. You are able to create a task. However it does not show up in the task list (because GCal does not support it). Expected Results: "Task Creation error" returned.
Yes, thats definitely possible. I'd probably prefer removing google calendars from the task dialog though.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
That would work as well and is probably preferred. In such case, what happens if you only have one calendar, the google calendar, in lightning. You should get some sort of warning : "No calendars supporting task creation available"
All task creation symbols/commands should be disabled in that case. I think this is something that can be fixed in core calendar code. A calendar/provider specific property i.e "capabilities.events" and "capabilities.tasks" should tell the UI if tasks or events are supported and enable/disable the needed buttons. Daniel, do you agree on the naming, or do you have a better suggestion?
Actually, I'd prefer "capabilities.tasks.supported" similar to "cache.supported"
I am a bit unsure whether we should specify those in a positive manner or whether those providers that don't support them should state that in a negative: var supported = cal.getProperty("capabilities.tasks.supported"); if (supported || (supported === null)) ... vs. the shorter if (cal.getProperty("capabilities.tasks.disabled")) // or ".unsupported" ... We may consider wrapping that mimic up into a helper function, e.g. if (getPropertyDefault(cal.getProperty("capabilities.tasks.supported"), true)) ... (maybe such a helper could be useful for calls on calIItemBase::getProperty, too)
This patch adds support for task and event capabilities for providers. I stayed with "capabilities.tasks.supported", since its easy to check (cal.getProperty("cap...") !== false). For events, dragging is also disabled if the default calendar does not support tasks. In task mode, its still possible to enter something into the quick-add bar which gets passed to adoptItem, but this seems to be a general problem since its also possible when all calendars are readonly. I believe there is a bug for this.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #296758 - Flags: review?(daniel.boelzle)
Comment on attachment 296758 [details] [diff] [review] Add task and event capabilities - v1 r=dbo
Attachment #296758 - Flags: review?(daniel.boelzle) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
Whiteboard: [gdata-cvs]
Checked in latest nightly build 20080217 -> task is fixed and verified.
Status: RESOLVED → VERIFIED
Whiteboard: [gdata-cvs] → [gdata-0.4]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: