Closed
Bug 1187741
Opened 10 years ago
Closed 10 years ago
VTODO only calendar disables "add as task" button
Categories
(Calendar :: Tasks, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
4.0.2.1
People
(Reporter: knut.grahlmann, Assigned: merike)
References
Details
Attachments
(1 file, 1 obsolete file)
2.74 KB,
patch
|
merike
:
review+
Fallen
:
approval-calendar-beta+
Fallen
:
approval-calendar-esr+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build ID: 20150630154324
Steps to reproduce:
- Only have the Tasks view on a Zarafa Calendar integrated (https://<server>:8443/caldav/<username>/Tasks
- type: caldav
- Don't have any other calender integrated
Actual results:
- Button "Add as task" grayed out
- However, manually adding a task works fine (task synchronized with server)
Expected results:
Only the "add as event" button should be grayed out.
Errors seems to be in calendar-extract.js:
if (newEvent.getAttribute("disabled") == "true") {
// buttonsDisabled = true;
// contextDisabled = true;
}
Not fully understanding the details, this seems as if the possibility that (only a new task can be created but no new event) has not been foreseen. Commenting out these two lines enables both buttons (NB: workaround, as "add as event" button should still be grayed out) again and results in a working "add as task" dialog.
Comment 1•10 years ago
|
||
Are both, add new event and add new task buttons disabled or just the task button? What do you mean by adding manually?
Can you please enable calendar.debug.log and calendar.debug.log.verbose in the config editor and check the error console (ctrl+shift+j) after a restart of TB? The server should advertise its capabilities. Can you post the respective messages here? Also, please check for other suspicious messages.
Thanks for looking into this!
Yes, both buttons are disabled. To prevent a potential misunderstanding: I do not refer to "new event" or "new task", but "add as event" and "add as task"
Sorry, what I mean is: when I go to "Events and Tasks" in the menu bar, "new event" is (rightly) grayed out, but "new task" is not and works perfectly.
==> That's why I came to the conclusion that the server rightly advertises its capabilities but the mentioned code in the first post causes the 'trouble'.
Debug messages below. Nothing suspicious to be found...
CalDAV: Calendar <name> generally supports calendar-schedule
CalDAV: DAV header: 1, access-control, calendar-access, calendar-schedule, calendarserver-principal-property-search
CalDAV: send: OPTIONS https://<URL>
CalDAV: Authentication scheme for fook is Basic
CalDAV: Found principal url from DAV:current-user-principal /caldav/<user>/
Adding supported items: VTODO for calendar: <name>
Comment 3•10 years ago
|
||
Merike, this is also releated to the extractor - can you talke a look at it?
Flags: needinfo?(merikes.lists)
Assignee | ||
Comment 4•10 years ago
|
||
I think the first comment is correct here, tasks only calendars are not considered in code when disabling extraction and therefore both options get disabled even if one should remain available. I'll take a look at it later today or tomorrow.
Meanwhile it would be helpful to know what is the easiest way to set up a tasks only or events only calendar? This way I can test both scenarios properly later on.
Assignee: nobody → merikes.lists
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(merikes.lists)
Comment 5•10 years ago
|
||
> Meanwhile it would be helpful to know what is the easiest way to set up a
> tasks only or events only calendar? This way I can test both scenarios
> properly later on.
You will probably need a caldav calender serverside configured for task only. Eventually Google also supports this, but I'm not sure.
Maybe not the nicest way, but tweaking calDavCalendar.js might be an option (if no serverside solution is available). Also happy to test code for VTODO-only situation.
calDavCalendar.js, removing the VEVENT capability from mSupportedItemTypes:
let supportedComponents = caldavXPath(multistatus,
"/D:multistatus/D:response/D:propstat/D:prop/C:supported-calendar-component-set/C:comp/@*[local-name()='name']");
if (supportedComponents && supportedComponents.length) {
thisCalendar.mSupportedItemTypes = [ compName
for each (compName in supportedComponents)
if (thisCalendar.mGenerallySupportedItemTypes.indexOf(compName) >= 0)
];
cal.LOG("Adding supported items: " + thisCalendar.mSupportedItemTypes.join(",") + " for calendar: " + thisCalendar.name);
}
Assignee | ||
Comment 7•10 years ago
|
||
Not fully tested yet, but this should work better for tasks only calendars.
Attachment #8642061 -
Flags: review?(philipp)
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to tk1 from comment #6)
> Maybe not the nicest way, but tweaking calDavCalendar.js might be an option
> (if no serverside solution is available). Also happy to test code for
> VTODO-only situation.
>
> calDavCalendar.js, removing the VEVENT capability from mSupportedItemTypes:
That's an useful trick! I tried out with Google calendar and with the patch applied it properly enables only events now. Previously task buttons and context menu entry were enabled for conversion too although it didn't work if this was the only calendar available. After changing the calendar to support only tasks the opposite case seemed to work well too.
So hopefully it will work for you too.
Comment 9•10 years ago
|
||
Comment on attachment 8642061 [details] [diff] [review]
bug1187741
Review of attachment 8642061 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, r=philipp.
Attachment #8642061 -
Flags: review?(philipp) → review+
Comment 10•10 years ago
|
||
Merike, is this fully tested so we can consider this for 4.0.2, too (eventually without having this on cc first)?
Flags: needinfo?(merikes.lists)
Assignee | ||
Comment 11•10 years ago
|
||
This fixes missing semicolons and an issue with re-enabling context menu after both options have been disabled.
It could be considered for next release but can also wait for next one if this seems too risky without wider testing.
Attachment #8642061 -
Attachment is obsolete: true
Flags: needinfo?(merikes.lists)
Attachment #8644556 -
Flags: review+
Reporter | ||
Comment 12•10 years ago
|
||
Happy to confirm that the patch works for me (calendar in task only setup):
- "add as event" button is disabled
- "add as task" button is enabled, starts the dialogue and task is added
Thanks a lot Merike!
Assignee | ||
Comment 13•10 years ago
|
||
In any case let's start with comm-central :)
Keywords: checkin-needed
Comment 14•10 years ago
|
||
url: https://hg.mozilla.org/comm-central/rev/fbc2a9c68d93a89fb49f9611cb9db4f328853f27
changeset: fbc2a9c68d93a89fb49f9611cb9db4f328853f27
user: Merike Sell <merike.sell@eesti.ee>
date: Thu Aug 06 13:27:00 2015 +0200
description:
Bug 1187741 - VTODO only calendar disables "add as task" button. r=philipp
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 4.4
Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 8644556 [details] [diff] [review]
bug1187741 v2
This moved to aurora meanwhile and I haven't heard of any issues. Although according to AMO almost nobody uses nightlies and aurora builds?
Could this be considered for 4.0.3 as well? If not for release then when is next beta release planned?
Attachment #8644556 -
Flags: approval-calendar-release?(philipp)
Attachment #8644556 -
Flags: approval-calendar-beta?(philipp)
Comment 16•10 years ago
|
||
The statics on AMO only tell what system have checked for Lightning updates at AMO. Lightning comm-central and comm-aurora builds don't use AMO for updates therefore you don't see them in the AMO statistics. Same is true for many Linux distributions that install Lightning from its own repositories instead of AMO.
Comment 17•10 years ago
|
||
Comment on attachment 8644556 [details] [diff] [review]
bug1187741 v2
4.0.3 is fine for me. Beta is coming up this or next week.
Attachment #8644556 -
Flags: approval-calendar-release?(philipp)
Attachment #8644556 -
Flags: approval-calendar-release+
Attachment #8644556 -
Flags: approval-calendar-beta?(philipp)
Attachment #8644556 -
Flags: approval-calendar-beta+
Comment 18•10 years ago
|
||
Backported to releases/comm-beta changeset 422323c3e92f
Target Milestone: 4.4 → 4.3
Comment 19•10 years ago
|
||
Backported to releases/comm-esr38 changeset 9bb11bb336cc
Target Milestone: 4.3 → 4.0.3
You need to log in
before you can comment on or make changes to this bug.
Description
•