Project order

This topic contains 7 reply and 3 voices, and was last updated by Kerstin 8 years, 7 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
August 10, 2015 at 2:09 pm 66268
Kerstin Is there a way to change the project order in the overview? The projects created are ordered by creation date as it seems. For my purposes it would be clearer to order the Projects by project names / titles Thank's!
August 10, 2015 at 2:56 pm 66277
Yeasin Arafat Yeasin Arafat

Hello Kerstin,

We do not have this feature right now. If you want this feature then you have to customize.

Thank you.

August 10, 2015 at 3:34 pm 66284
Kerstin Kerstin

Hello,

could you please tell me how or in which script? I thought this is a basic functionality… Will this feature be implemented in the next update? I have even more ideas 😉

Thank’s!

August 10, 2015 at 4:26 pm 66308
Nayem Nayem

Hello,

If you want to show your proejct in order of name or character then please open Project manger/class/project.php file.

In this file you will get those code in line number 528-

$args = array(
            'post_type'   => 'task_list',
            'numberposts' => -1,
            'order'       => 'ASC',
            'orderby'     => 'menu_order',
            'post_parent' => $project_id
            
);

You have to replace these with-

$args = array(
            'post_type'   => 'task_list',
            'numberposts' => -1,
            'order'       => 'ASC',
            'orderby'     => 'menu_order',
            'post_parent' => $project_id,
            'orderby'        => 'post_title',
            'order'          => 'ASC'
);

Thanks.

August 10, 2015 at 4:46 pm 66319
Kerstin Kerstin

Hello Nayem,

I can’t find these code lines / the array in project.php. In my script, theres a comment in line 528(“Generates navigational menu for a project”)

I found the function get_projects starting with this in line 263:

$args = array(
‘post_type’ => ‘project’,
‘posts_per_page’ => $limit,
‘offset’ => $offset
);

in the following lines, the filter settings are checked and added to the query…

August 10, 2015 at 4:50 pm 66321
Nayem Nayem

Hello,

Yes, you are in right place. Added them there.

August 10, 2015 at 5:14 pm 66330
Kerstin Kerstin

Hello again,

it works, thank you! 🙂

There’s another view, in which the projects are listed and where the alphabetical order would be great to habve, too:
– My tasks

Where do I find the code for this view?

August 13, 2015 at 1:33 pm 66855
Kerstin Kerstin

Found it: to order the projects on “My tasks” alphabetically, line 106 in /class/task.php hast to be modified.
Instead of:

ORDER BY project_id DESC";

write:
ORDER BY project_title ASC";

Viewing 7 Posts - 1 through 7 (of 7 total)