Login or Register

RSS IconRecent posts in this topic

avatar
James Mitchell on Dec 28. 2006. 10:27 am
I have run into an interesting issue and wanted to know if anyone knows the fix. Keep in mind we may be using this feature for something unique, but any help would be great.

Currently we have several Milestones which are assigned to various people in a defined company. Our company shares one Google Calendar (one neat feature from google). However, if I am logged in and want to export the iCalendar Milestones for the entire company it only exports the Milestones assigned to me.

Is there a way to specify that I want to export ALL the Milestones for a Company as opposed to individuals?

Secondly, I think it would be really neat to somehow have an automatic sync with Google Calendar (as an optional sync). Is this possible with any third party things presently or in the works for activeCollab future versions.
avatar
Ilija Studen on Dec 28. 2006. 8:48 pm
Your workflow is a bit different that workflow that is expected in activeCollab (where you need to track only tasks and milestones assigned to you). There is no global iCal file (there is global iCal per user, but not for all users). You can try by assigning a milestone to the company. In that case it will be listed in iCal of all company members.

Problem with syncing is at Googles side as far as I know. Check out this topic. If problem is still on activeCollab side please let me know.
activeCollab team member
avatar
tjsingleton on Dec 28. 2006. 10:43 pm
James is my partner. We like to have an overview of everything that is going on. Half off the solution can be accomplished by modifying the feeds controller. I added a method called active_ical which is just pulls all active milestones. The file is then available at with the url ?c=feed&a=active_ical&id={id}&token={token}. I just grab my milestones feed, and change user_ical to active_ical.

I will post the code just in case anyone else needs the same functionality. I will warn though that it a quick and dirty hack, and it only took my 10-15minutes, so I make no guarantee.


I added

'active milestones' => 'active milestones',

to language/en_us/general.php

and added the following to application/controllers/feedcontroller.php

/**
* Show calendar for active milestones
*
* @param void
* @return null
*/
function active_ical() {
$this->setLayout('ical');

$user = $this->loginUserByToken();
if(!($user instanceof User)) {
header('HTTP/1.0 404 Not Found');
die();
} // if


$this->renderCalendar($user, lang('active milestones'), ProjectMilestones::getActiveMilestones());
} // active_ical

I must say I'm very impressed with the the wonderfully written code. It was a breeze to create this "hack".

The problem still exists with Google calendar, but as mentioned that's Google's problem. Any suggestions on a web-based calendar that treats ical feeds correctly?
avatar
tjsingleton on Dec 29. 2006. 7:31 am
Just a note. It seems google cal is updating the feed, but I'm not sure how often it is getting updated. So it *seems* to be working for us.

James wanted me to point out that google will not updated "imported" ical, but only if you subscribe to it in the following way.

[Manage Calendars] > in "other calendars" section -- [add Calendar] > Select the tab [Public Calendar Address] > Enter the feed as outlined above. > [Add]

One concern I have is the token. I imagine that is for security purposes and a way to validate the user, but does it expire? (Maybe I should go code digging again before asking :))
avatar
tjsingleton on Dec 29. 2006. 8:56 am
:) Token seems to be a hash based on the password. So the feed should only change if the password changes.
avatar
Ilija Studen on Dec 29. 2006. 11:03 am
You are right - token is password based (hash of salt and password modified with random "twister" string) and it changes only when user changes his password. When password is changed salt, password and twister string are changed and all RSS and iCal feeds for a given user are not valid any more.
activeCollab team member
avatar
James Mitchell on Dec 29. 2006. 1:06 pm
Wonderful... thanks for the insight, but more importantly thanks for the awesome product !
avatar
James Mitchell on Dec 29. 2006. 3:21 pm
fyi: We wrote up a quick tutorial on the three methods on syncing your Milestones with the Google Calendar.

Sync your activeCollab with your Google Calendar
avatar
Ilija Studen on Dec 29. 2006. 4:57 pm
Thanks for the tutorial!
activeCollab team member
avatar
tjsingleton on Dec 29. 2006. 7:15 pm
One area I could improve would be to check if user is an administrator, to limit access to the feed.

RSS IconRecent posts in this topic