[Vtigercrm-developers] Email related: last email at top of the list

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Wed Jul 1 02:20:37 GMT 2015


Hi Simone

Unfortunately sorting by time as well as date is not quite as easy. The time is stored in a separate varchar field.

The table that is used is the vtiger_activity table.

If you change

           $orderBy = $request->get('orderby','date_start');
To
           $orderBy = $request->get('orderby', 'createdtime');

Then this will sort on the vtiger_crmentity created time which may or may not be suitable

Give it a try and see if it helps

Good luck

Chris

From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Simone Travaglini
Sent: Tuesday, 30 June 2015 5:01 PM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] Email related: last email at top of the list

Little issue: in this way is ordered by date but not by hours... there is a way to correct?

2015-06-26 8:33 GMT+02:00 Simone Travaglini <simonetravaglini at gmail.com<mailto:simonetravaglini at gmail.com>>:
many thanks for fix. I also think should be normal setting!

2015-06-26 8:13 GMT+02:00 Stacey Johnson <stacey.johnson110 at gmail.com<mailto:stacey.johnson110 at gmail.com>>:
Thanks for this fix. It Should be included in vtiger as default.

Regards

On Fri, Jun 26, 2015 at 7:14 AM, Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au<mailto:Chris.Hamono at sa.gov.au>> wrote:
Hi Simone

Do the following core code change:

Open
"modules\Emails\views\InRelation.php"

At around line 27 Change
           $orderBy = $request->get('orderby');
           $sortOrder = $request->get('sortorder');
TO
           $orderBy = $request->get('orderby','date_start');
           $sortOrder = $request->get('sortorder','DESC');


This sets your defaults to the date the email was sent ordered from newest to oldest.

Chris

From: vtigercrm-developers-bounces at lists.vtigercrm.com<mailto:vtigercrm-developers-bounces at lists.vtigercrm.com> [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com<mailto:vtigercrm-developers-bounces at lists.vtigercrm.com>] On Behalf Of Simone Travaglini
Sent: Thursday, 25 June 2015 4:12 PM

To: vtigercrm-developers at lists.vtigercrm.com<mailto:vtigercrm-developers at lists.vtigercrm.com>
Subject: Re: [Vtigercrm-developers] Email related: last email at top of the list

The problem is that there is no reason why email are sorted from the older to the most recent.
There is at least a way to force this change permanently?

thanks for support

2015-06-25 5:22 GMT+02:00 Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au<mailto:Chris.Hamono at sa.gov.au>>:
Perhaps a setting could be included for the default sort order?

Chris

From: vtigercrm-developers-bounces at lists.vtigercrm.com<mailto:vtigercrm-developers-bounces at lists.vtigercrm.com> [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com<mailto:vtigercrm-developers-bounces at lists.vtigercrm.com>] On Behalf Of Stacey Johnson
Sent: Thursday, 25 June 2015 11:49 AM
To: vtigercrm-developers at lists.vtigercrm.com<mailto:vtigercrm-developers at lists.vtigercrm.com>
Subject: Re: [Vtigercrm-developers] Email related: last email at top of the list

I would ask: Why list is sorted like that? Is there any reason?

On Thu, Jun 25, 2015 at 12:31 AM, Simone Travaglini <simonetravaglini at gmail.com<mailto:simonetravaglini at gmail.com>> wrote:
Yes manually... but how to set it definitively?

2015-06-24 18:58 GMT+02:00 Manu urs <manu.k at vtiger.com<mailto:manu.k at vtiger.com>>:
We can order the related list view record based on the any column . By Clicking on the "TIme sent" header  we can switch between the Ascending and descending order.
Regards,
Manu Urs

On Wed, Jun 24, 2015 at 9:59 PM, Alan Bell <alan.bell at libertus.co.uk<mailto:alan.bell at libertus.co.uk>> wrote:
isn't the problem better stated as getting a related list to open to the last page by default rather than turning the emails upside down?

Alan.

On 24/06/15 17:26, Søren Madsen wrote:

+1
Den 24/06/2015 17.39 skrev "Stacey Johnson" <stacey.johnson110 at gmail.com<mailto:stacey.johnson110 at gmail.com>>:
That's indeed not correct...was thinking of the same

Stacey

On Wed, Jun 24, 2015 at 6:55 PM, Simone Travaglini <simonetravaglini at gmail.com<mailto:simonetravaglini at gmail.com>> wrote:
Hello,
why in email related to record at the top of the list there is the older and not the most recent? Ho we can invert this definitively?



--
Simone Travaglini
328 5499846
Linkedin: Simone Travaglini


Rispetta l'ambiente: non stampare questa mail se non ti è veramente necessario!

_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/


_______________________________________________

http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/



--
Regards,
Manu

_______________________________________________
http://www.vtiger.com/



--
Simone Travaglini
328 5499846
Linkedin: Simone Travaglini


Rispetta l'ambiente: non stampare questa mail se non ti è veramente necessario!

_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/



--
Simone Travaglini
328 5499846
Linkedin: Simone Travaglini


Rispetta l'ambiente: non stampare questa mail se non ti è veramente necessario!

_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/



--
Simone Travaglini
328 5499846
Linkedin: Simone Travaglini


Rispetta l'ambiente: non stampare questa mail se non ti è veramente necessario!



--
Simone Travaglini
328 5499846
Linkedin: Simone Travaglini


Rispetta l'ambiente: non stampare questa mail se non ti è veramente necessario!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150701/150cf2fe/attachment-0001.html>


More information about the vtigercrm-developers mailing list