🖍️
Vtiger Tweaks
  • How to Make Modal Popups Draggable in Vtiger
  • Synology (DSM 7.0.x)
  • How to Change The Default Ticket Order In ListView
  • Google Workspace Email Forwarding for Vtiger Mail Converter
Powered by GitBook
On this page

Was this helpful?

How to Change The Default Ticket Order In ListView

PreviousSynology (DSM 7.0.x)NextGoogle Workspace Email Forwarding for Vtiger Mail Converter

Last updated 2 years ago

Was this helpful?

The example was created using Vtiger v7.1 code base. The later versions do have the same "sorting function", however the line number might be different.

Vtiger Version: v7.1

File: /modules/Vtiger/models/ListView.php

Line: 245~

Full Diff: (scroll down to line 245)

Code to be added

} else if(empty($orderBy) && empty($sortOrder) && $moduleName = "HelpDesk"){
	$listQuery .= ' ORDER BY vtiger_crmentity.modifiedtime DESC';
	// You can sort by 3x values:
	// vtiger_crmentity.modifiedtime
	// vtiger_crmentity.createdtime
	// vtiger_crmentity.crmid

Explanation

Screenshot:

  1. Is what I added (new code)

  2. Is where I copied from

  3. Specifies the module, so in this case, it will only apply to Tickets (HelpDesk is the actual module name).

  4. Use the fields from vtiger_crmentity for sorting.

listviewSortOrderVtiger7.html
https://s3.vtexperts.co/224/t/10/20/7A5t6W723U6H6T4v4Z.png