Login or Register

RSS IconRecent posts in this topic

avatar
chris.miller on Jun 11. 2008. 2:12 pm
It would be nice:

1) to be able to search for a person across companies, or even within just 1 company. Since everything is paginated it makes it potentially time-consuming to search for a user.

2) to have the people list for a company alphabetized. Right now it's just ordered by the order the users were added to the database for a company.
avatar
chris.miller on Jun 11. 2008. 2:18 pm
FYI - I updated /application/modules/system/models/users/Users.class.php in the findByCompanyAndIds() function around line 74. I simply added another argument to the arguments array to order by last_name and then first_name. I'm not sure if this will mess up any other views, but it gives me what I want as far as I can tell. Here's the new findByCompanyAndIds function in case you want it:

function findByCompanyAndIds($company, $ids) {
  return Users::find(array(
    'conditions' => array('company_id = ? AND id IN (?)', $company->getId(), $ids),
    'order' => 'last_name, first_name'
  ));
} // findByCompanyAndIds

avatar Staff
Ilija Studen on Jun 11. 2008. 2:34 pm
Hi Chris,

You can use Search from the toolbar. It searches for projects, in projects or for users.

We were just discussing how people section can be improved in the future so don't worry - we'll be work on that soon.

PS: Modification you added should not cause any problem except maybe in cases where first and last name are missing (these fields are optional). You might consider adding email at the end of the list of ORDER BY fields to cover that situation.
activeCollab Team Member
avatar
chris.miller on Jun 11. 2008. 2:40 pm
Ilija,

You're quick! Thanks for reply and confirmation. I like your idea about the email address field too - I'll add that as well.

Thanks!

RSS IconRecent posts in this topic