The Thinkery

Not finding what you're looking for? Don't hesitate to contact us!

Before Posting...

Before posting questions in the forums, please be sure to read the FAQs by clicking on the FAQs link in the sidebar product menu. You must be logged in and have a valid subscription to access the SUPPORT FORUMS.
×
Support Policy Notice

As outlined in our Rules section (though never closely followed by our staff!), effective immediately we will no longer be taking time to provide customizations of our products.

× PLEASE DO NOT POST SUPPORT QUESTIONS HERE!

Ability to automatically list employees alphabetically by last name?

More
8 years 6 months ago #43998 by tim
tim replied the topic: Ability to automatically list employees alphabetically by last name?
Hi-- by default sorting is accomplished by the order you set in the WF admin. It's a minor code tweak to do it alphabetically as you describe.

Thanks

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #45864 by neider09
neider09 replied the topic: Ability to automatically list employees alphabetically by last name?
Any Chance you can post the minor tweak to the code. I am certain there are many many users frustrated that we can not just set default sort to last name.

Thank you
Gary

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #45895 by eldonenator
eldonenator replied the topic: Ability to automatically list employees alphabetically by last name?
I'd also be keen for the tweak please :) Manually sorting is rather intense when you have a good amount of employees.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #46015 by zoom1815
zoom1815 replied the topic: Ability to automatically list employees alphabetically by last name?
Same here, it would definitely help, if you could post the code tweak.

Please Log in or Create an account to join the conversation.

More
8 years 3 weeks ago #46116 by shaunlux@gmail.com
shaunlux@gmail.com replied the topic: Ability to automatically list employees alphabetically by last name?
Can we please get an answer on how to change the default sort?

This is kind of a basic feature that should be offered.

Please Log in or Create an account to join the conversation.

More
8 years 3 weeks ago #46129 by onetechn
onetechn replied the topic: Ability to automatically list employees alphabetically by last name?
IANP... but try this.

/components/com_workforce/models/allemployees.php
Line #60 inside the the populateState() function.

Where it sets the default value if nothing is sent via the form:
$orderCol = $app->input->get('filter_order', 'e.ordering');
if (!in_array($orderCol, $this->filter_fields)) {
	$orderCol = 'e.ordering';
}

Adjust $orderCol to use e.lname if it doesn't find anything passed from the form:
$orderCol = $app->input->get('filter_order', 'e.ordering');
if (!in_array($orderCol, $this->filter_fields)) {
	$orderCol = 'e.lname';
}

Please Log in or Create an account to join the conversation.

Moderators: vinny
Time to create page: 0.481 seconds