Open Bug 472483 Opened 16 years ago Updated 2 years ago

Make use of activity manager for calendar operations

Categories

(Calendar :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: Fallen, Unassigned)

References

(Depends on 1 open bug, Blocks 6 open bugs)

Details

(Keywords: student-project)

Bug 257942 will bring us the activity manager. We can use this to show the progress of add/delete/modify operations.

I have some draft code that does this, please check with me if you are interested in taking this bug, then I can provide you with the code.

Depending on amount of work an activity for getting items from the calendar can be done in a different bug. We might want to consider using only one activity per calendar for getting items and reuse it if another getItems call is made. Otherwise we will spam the activity manager and I doubt thats wanted.
Whiteboard: [needs activity manager]
We should also improve the error messages shown in the activity manager, since they are then much more visible.
Flags: wanted-calendar1.0+
Looking at Bug 257942 I assume this is for Lightning only?
Component: Calendar Views → Lightning Only
QA Contact: views → lightning
If this is Lightning only then the bug 463061 is not a duplicate.
I have the feeling this could be a good student project. This bug may be a medium amount of work, depending on student skills. The idea would be to hook into all sorts of calendar operations to have them show in the Thunderbird activity manager. Possible operations could be:

* add/modify/delete items
* Getting items. This includes:
  - synchronize items from cached calendars
  - retrieving items for uncached calendars
* fired alarms
* received invitations (auto-schedule calendars, not email)

Also this might make our current status bar code obsolete. The student should look into this and possibly remove the code.

I'll be happy to provide my draft code to any student wanting to take this.
Assignee: philipp → nobody
Status: ASSIGNED → NEW
Keywords: student-project
Whiteboard: [needs activity manager]
Hi,

I'd keen to work on this bug. I'm new to the Mozilla community and I've set up my Thunderbird build. I was wondering if someone could tell me what the next step is?

Thanks!
Hi Alan,

welcome to Mozilla :) ! I shall be glad to help you out in the process. I can perhaps guide you through the different calendar operations especially in the caching segments (add/modify/delete operations) . For Activity Manager, I believe this documentation would be helpful. 
[1] https://wiki.mozilla.org/Thunderbird:Activity_Manager
[2] https://wiki.mozilla.org/Thunderbird:Activity_Manager/Developer

It has some sample code to print stuff into the TB activity Manager. Meanwhile I am trying to search the code base for possible usages of the activity manager (I dont know if we are doing it yet).
Please also observe my ancient patches:

http://hg.mozilla.org/users/mozilla_kewis.ch/patches/file/ccb8bb5d7eab/activity-manager-calendar.diff

http://hg.mozilla.org/users/mozilla_kewis.ch/patches/file/ccb8bb5d7eab/activity-sync-cached.diff

You shouldn't try applying them but rather take concepts from there. The challenging part about this bug is to keep the code that manages the actitivies (which is basically view code) out of the model/controller parts of Lightning.
Assignee: nobody → yeojw10
Hi Philipp,

From my understanding, model refers to calStorageCalendar.js and controller refers to calCalendarManager.js. I'm currently working on the code inside calStorageCalendar.js (addItem, modifyItem and deleteItem) which I believe handles the add, modify and delete operations for calendar items. I was wondering if I should be modifying the XUL files instead? And if so, which files should I be looking at instead?

Thanks :)
Hi Alan, sorry I didn't get back to you in the bug. Or did we have this discussion per Email? Anyway, if you are still interested in fixing this one let me know.

Try to see this from a MVC (Model-View-Controller) perspective. The (storage) calendar is the model, the XUL files are the view and some other parts of calendar, including the calendar manager, could be seen as the controller.

You want to create a controller for this that observes the calendars (not only storage) and then notifies the activity manager UI that something needs to change.
No longer blocks: 514413
No longer depends on: activitymgr
Note also it would be cool to have icons in the calendar list that the calendar is synchronizing. This could be done in a followup bug though.
Thank you, bug 756790 for clearing dependencies!
Blocks: 514413
No longer depends on: 514413
Status: NEW → ASSIGNED
Is this still active?
Assignee: yeojw10 → nobody
Status: ASSIGNED → NEW
Type: defect → enhancement
Component: Lightning Only → General
Blocks: tb-logging
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.