Login or Register

RSS IconRecent posts in this topic

avatar
sanashaikh on Aug 8. 2008. 12:24 am
Hi ,
i am using activecollab.i have created one tab in project management,where user can directly generate milestones,he does not have to go on milestone tab and create new milestone.

this is working fine,when i see milestone page it shows me all milestones , but when i goto project overview it was not updated.

its shows previous records,i mean first there was only one milestone but when i generate milestone from my code there are 24 milestone in the database but it was not showing in the projet overview page.i think it some cache relatd problem .

what i have to do so that when a user views this page he can see count of all milestone.

previously when there is only 1 milestone

"1 tasks done of 1 in the project (100% done)"

when there are 24 milestone

"1 tasks done of 1 in the project (100% done)"

why it is not updated.

when i update the one milestone which is already there

"1 tasks done of 24 in the project (100% done)"

please reply to me as soon as possible
avatar Staff
Ilija Studen on Aug 10. 2008. 1:08 am
How do you create milestones? Using activeCollab model (by creating new Milestone, populating fields and that calling save() method) or by directly inserting data into project_objects table?

If it's #2 you should avoid it. Use model layer instead because it's the safest way and it does a lot for you (rebuilding caches is one of the things).

PS: Regarding cache file creation, you don't do that directly, by creating a file. Instead, you call cache_set() to add data to the cache and cache_get() to retrieve it later on.
activeCollab Team Member
avatar
sanashaikh on Aug 11. 2008. 1:39 am
thanks for your reply.

i have another question.if i want to add another tool say "Reports" after people tab . how can i do this.

thanks once again.
avatar Staff
Ilija Studen on Aug 11. 2008. 1:46 am
You need to handle on_project_tabs event. Check handlers.php and /handlers folders in milestones module for example to see how to do this.
activeCollab Team Member
avatar
sanashaikh on Aug 14. 2008. 3:24 am
i have created a new tab reports but can u plz tell me where are all database realted files. means in which file is select query.

thanks
avatar Staff
Ilija Studen on Aug 14. 2008. 3:32 am
It depends what you want to do. In most cases activeCollab does not query database directly. Instead, it uses model classes. For every table there are two classes:

- object class represent single row in the system. User for example.
- manager class that works with sets of rows. Users for example.

Here is a short example that illustrates this:

$users = Users::findByCompany($company); // returns array of User instances
foreach($users as $user) {
  print $user->getDisplayName() . '<br />';
}


or:

$user = new User();
$user->setDisplayName('Ilija Student');
$user->save(); // Insert

// Whoops, not my name
$user->setDisplayName('Ilija Studen');
$user->save(); // Update
activeCollab Team Member

RSS IconRecent posts in this topic