sort the files inside folder to update date by default

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
prashanth
Junior Boarder
Junior Boarder
Posts: 28
Joined: Tue Mar 08, 2011 12:43 pm

sort the files inside folder to update date by default

Post by prashanth » Tue Nov 15, 2011 6:07 am

As a default when we open the folder in openkm the files are sorted by according to name as a default. Is there any way to sort the files according to update date[/b] as a default. I mean recently updated files should show first as a default.

jllort
Moderator
Moderator
Posts: 10608
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: sort the files inside folder to update date by default

Post by jllort » Tue Nov 15, 2011 12:51 pm

Now it's needed minimal source code change for doing it, really not much complicated. I've added this feature to be included in our roadmap http://issues.openkm.com/view.php?id=1892

gr87
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Oct 04, 2013 6:54 am

Re: sort the files inside folder to update date by default

Post by gr87 » Mon Oct 14, 2013 10:22 am

Hello,

has this feature been implemented? I'd be interested in changing this, without changing java code...

jllort
Moderator
Moderator
Posts: 10608
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: sort the files inside folder to update date by default

Post by jllort » Tue Oct 15, 2013 6:08 pm

Is still not implemented.

gr87
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Oct 04, 2013 6:54 am

Re: sort the files inside folder to update date by default

Post by gr87 » Wed Oct 16, 2013 11:28 am

Okay, I'm currently working on changing the Java code and recompiling it. The client insists on this functionality.

Could you please provide some guidance what should be changed? I have found the class ExtendedColumnSorter. Is this where it should be changed? Could you provide the code for the appropriate class?

Any help would be greatly appreciated.

jllort
Moderator
Moderator
Posts: 10608
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: sort the files inside folder to update date by default

Post by jllort » Fri Oct 18, 2013 7:58 am

I think the most easiest way for doing it is change OKMDocumentServlet -> getChilds
http://doxygen.openkm.com/openkm/d5/d4d ... 1bed4c47b5

As you can see default list is based on ordering by DocumentComparator

Code: Select all

Collections.sort(docList, DocumentComparator.getInstance(getLanguage()));
The easiest will be change it ( and similar for folders and mails, FolderServlet and MailServlet ). That will have the only inconvenience that will be sorted folders, documents and mails ordered by date but grouped by type.

If you want more fine ordering then you should take a look at FileBrowser.java -> ExtendedScrollTable.java and force by default ordering by column date ( I think by default is not ordered ). To ensure all is right when you see ordered elements click on toolbar refresh. Try to change ordering to other column and refresh etc...

gr87
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Fri Oct 04, 2013 6:54 am

Re: sort the files inside folder to update date by default

Post by gr87 » Mon Oct 21, 2013 10:36 am

Thank you jllort,

we have managed to take care of the sorting, over the weekend, but I think we used another method.

Now I have another similar question. In the "Pending Tasks" list, the order is ascending. Would it be possible to make it so that the newest dates are on top?

jllort
Moderator
Moderator
Posts: 10608
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: sort the files inside folder to update date by default

Post by jllort » Tue Oct 22, 2013 6:57 am

Please add other post for it do not merge several questions in same post because can cause confusion to users who read it ( I will advace that's easy, simply doing minimal change in WorkflowServlet and apply ordering there using new comparator ).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest