Using "Quick Filter" resets the list view columns #4371

Open
opened 2026-02-20 16:16:41 -05:00 by deekerman · 1 comment
Owner

Originally created by @cartbar on GitHub (Aug 20, 2020).

Issue

When viewing a list of objects, if you use the "Column Chooser" to change the columns displayed in the list and then use the "Filter" to select a subset of records, if you use the "Quick Filter", the columns displayed in the list revert back to those set up before you used the "Column Chooser".

Expected Behavior

Columns in list view should remain unchanged after applying the filter

Actual Behavior

Columns in list view revert to pre-"Column Chooser" settings

Possible Fix

It appears that the "Quick Filter" does not post a "displayColumns" field, whereas the "Advanced Filter" does. An example from the "Quick Filter":

searchFormTab=basic_search&module=Contacts&action=index&query=true&orderBy=&sortOrder=&search_name_basic=Fred&account_name_basic=&button=Search

and from "Advanced Filter":

searchFormTab=advanced_search&module=Contacts&action=index&query=true&first_name_advanced=Fred&last_name_advanced=&account_name_advanced=&email_advanced=&phone_advanced=&address_street_advanced=&address_city_advanced=&address_state_advanced=&primary_address_country_advanced=&address_postalcode_advanced=&saved_search_name=&search_module=&saved_search_action=&displayColumns=FIRST_NAME%7CLAST_NAME%7CACCOUNT_NAME%7CWMSM1_CATEGORY%7CEMAIL1%7CPHONE_WORK%7CDATE_ENTERED&hideTabs=DEPARTMENT%7CDO_NOT_CALL%7CTITLE%7CPHONE_HOME%7CNAME%7CPHONE_MOBILE%7CPHONE_OTHER%7CPHONE_FAX%7CEMAIL2%7CPRIMARY_ADDRESS_STREET%7CPRIMARY_ADDRESS_CITY%7CASSIGNED_USER_NAME%7CPRIMARY_ADDRESS_STATE%7CPRIMARY_ADDRESS_POSTALCODE%7CPRIMARY_ADDRESS_COUNTRY%7CALT_ADDRESS_STREET%7CALT_ADDRESS_CITY%7CALT_ADDRESS_STATE%7CALT_ADDRESS_POSTALCODE%7CALT_ADDRESS_COUNTRY%7CCREATED_BY_NAME%7CMODIFIED_BY_NAME%7CSYNC_CONTACT&orderBy=FIRST_NAME&sortOrder=ASC&button=Search&saved_search_select=_none

When the requests are processed by view.list.php, listViewPrepare(), around line 200, the line

$this->storeQuery->saveFromRequest($this->module);

attempts to use the "displayColumns" in the request, but since it isn't there, it uses the default columns

Steps to Reproduce

  1. Go to the Contacts list view
  2. Use the "Column Chooser" to remove a column
  3. Use the "Filter" (specifically "Quick Filter")

Removed column re-appears

Context

Getting user complaints about it

Your Environment

  • SuiteCRM Version used:
    Version 7.11.15
    Sugar Version 6.5.25 (Build 344)

  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):

  • Environment name and version (e.g. MySQL, PHP 7):

  • Operating System and version (e.g Ubuntu 16.04):

Originally created by @cartbar on GitHub (Aug 20, 2020). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> #### Issue <!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug --> <!--- Ensure that all code ``` is surrounded ``` by triple back quotes. This can also be done over multiple lines --> When viewing a list of objects, if you use the "Column Chooser" to change the columns displayed in the list and then use the "Filter" to select a subset of records, if you use the "Quick Filter", the columns displayed in the list revert back to those set up before you used the "Column Chooser". #### Expected Behavior <!--- Tell us what should happen --> Columns in list view should remain unchanged after applying the filter #### Actual Behavior <!--- Tell us what happens instead --> <!--- Also please check relevant logs (suitecrm.log, php error.log etc.) --> Columns in list view revert to pre-"Column Chooser" settings #### Possible Fix <!--- Not obligatory, but suggest a fix or reason for the bug --> It appears that the "Quick Filter" does not post a "displayColumns" field, whereas the "Advanced Filter" does. An example from the "Quick Filter": `searchFormTab=basic_search&module=Contacts&action=index&query=true&orderBy=&sortOrder=&search_name_basic=Fred&account_name_basic=&button=Search` and from "Advanced Filter": `searchFormTab=advanced_search&module=Contacts&action=index&query=true&first_name_advanced=Fred&last_name_advanced=&account_name_advanced=&email_advanced=&phone_advanced=&address_street_advanced=&address_city_advanced=&address_state_advanced=&primary_address_country_advanced=&address_postalcode_advanced=&saved_search_name=&search_module=&saved_search_action=&displayColumns=FIRST_NAME%7CLAST_NAME%7CACCOUNT_NAME%7CWMSM1_CATEGORY%7CEMAIL1%7CPHONE_WORK%7CDATE_ENTERED&hideTabs=DEPARTMENT%7CDO_NOT_CALL%7CTITLE%7CPHONE_HOME%7CNAME%7CPHONE_MOBILE%7CPHONE_OTHER%7CPHONE_FAX%7CEMAIL2%7CPRIMARY_ADDRESS_STREET%7CPRIMARY_ADDRESS_CITY%7CASSIGNED_USER_NAME%7CPRIMARY_ADDRESS_STATE%7CPRIMARY_ADDRESS_POSTALCODE%7CPRIMARY_ADDRESS_COUNTRY%7CALT_ADDRESS_STREET%7CALT_ADDRESS_CITY%7CALT_ADDRESS_STATE%7CALT_ADDRESS_POSTALCODE%7CALT_ADDRESS_COUNTRY%7CCREATED_BY_NAME%7CMODIFIED_BY_NAME%7CSYNC_CONTACT&orderBy=FIRST_NAME&sortOrder=ASC&button=Search&saved_search_select=_none` When the requests are processed by view.list.php, listViewPrepare(), around line 200, the line `$this->storeQuery->saveFromRequest($this->module);` attempts to use the "displayColumns" in the request, but since it isn't there, it uses the default columns #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Go to the Contacts list view 2. Use the "Column Chooser" to remove a column 3. Use the "Filter" (specifically "Quick Filter") Removed column re-appears #### Context <!--- How has this bug affected you? What were you trying to accomplish? --> <!--- If you feel this should be a low/medium/high priority then please state so --> Getting user complaints about it #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: Version 7.11.15 Sugar Version 6.5.25 (Build 344) * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): * Environment name and version (e.g. MySQL, PHP 7): * Operating System and version (e.g Ubuntu 16.04):
Author
Owner

@pgorod commented on GitHub (Aug 21, 2020):

The two things (quick filter + column layouts) are tied together, and they probably shouldn't be. This is a known issue and there are probably half a dozen issues about this already...

#7360 for example

@pgorod commented on GitHub (Aug 21, 2020): The two things (quick filter + column layouts) are tied together, and they probably shouldn't be. This is a known issue and there are probably half a dozen issues about this already... #7360 for example
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4371
No description provided.